Technical Articles
Obscure productivity tips #2: Improving SAPGUI shortdump scrolling experience
Has this ever happened to you? You’re doing some important business programming and suddenly…
FIELD-SYMBOLS: <a> type i.
<a> = 5.
Pictured: Important business programming
Getwa_not_assigned, you say? This piques your interest.
You instantly assume not_assigned means she’s single and start wondering who this Getwa girl is. Going by the name, she’s probably German. Maybe there’s a photo at the bottom? Perhaps a phone number? Naively, you try to scroll down.
It’s quite slow at first. It’s quite slow the second time as well. You increase your scrolling speed, naively thinking you can go faster than SAP. Hah!
You finally reach the bottom of the page, but there’s nothing. No Getwa. Also, you are now a bald old man and your dinner has gone cold over the years you’ve spent scrolling.
It doesn’t have to be like this. I propose a solution which will speed up your inevitable disappointment of not finding Getwa.
I know you can click the scrollbar, but that’s not scrolling. It’s clicking.
My solution is more sophisticated and does involve actual scrolling.
- Using Autohotkey, set up a script which will scroll 20 times every time you scroll the wheel up or down.
- There is a delay between each automated scroll because SAPGUI seems to cleverly block any further input while the current line is being scrolled.
- In practice, each manual scroll will move the window by about 7 to 15 lines, depending on various factors. I would love to know what those factors are.
- Show off your newfound powers to your colleagues.
- Feel like a god. If you’re religious, feel free to skip this step.
The following video was created using only a single movement of the mouse wheel:
Here’s the script so you don’t have to reinvent any. Feel free to fiddle with the numbers.
/*
"Smooth" scrolling for SAPGUI errors
*/
#If WinActive("Runtime Error - Description of Exception") || WinActive("ABAP Runtime Error")
{
WheelUp::
Loop 20
{
sleep 75
MouseClick, WheelUp
}
return
WheelDown::
Loop 20
{
sleep 75
MouseClick, WheelDown
}
return
}
You might need to do some localization if you’re using SAPGUI in a different language.
Using this method, I was able to reach the bottom of the longtext version in just a single tuesday!
I wish you the best of luck in your own obscure endeavors.
Frederik
This has got to be the best post ever made on this site