Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

erica.eym

macrumors newbie
Original poster
May 13, 2011
1
0
Hi everyone,

I am not familiar with applescript or SAP but I need to do a project for my internship. It was ok for me until SAP upgrades to a new version. But now it upgrades from "SAPGUI 7.10rev9" to "SAPGUI 7.20rev5".

This is how I get the current window of SAP but right now it doesn't work at all.

tell application "SAPGUI 7.20rev5"
activate
get id of front window of session 1
end tell


Is there something wrong with id class? Any help will be really appreciated. Thank you so much!
 

chown33

Moderator
Staff member
Aug 9, 2009
10,751
8,423
A sea of green
First, you need to describe what actually happens when it doesn't work. Saying "it doesn't work" is completely non-descriptive. Is there an error message? Post the complete text of the message. Is there some other error? Describe it.

Second, you should use AppleScript Editor to open the scripting dictionary of the SAPGUI app you're targeting (look in Editor's File menu, Open Dictionary... menu item). Make sure there is a session object, which has a window object, which has an id. If there's no session object, then there can't possibly be a front window object that belongs to it. Most scriptable apps I've encountered don't have a session object, so it pays to know what your specific app does and doesn't have.

If you've never seen a scripting dictionary before, then please explain how you know what the scriptable objects are. If you read about them in a scripting guide, then make sure the app's scripting objects didn't change in the upgrade.

Finally, you might have better luck getting your question answered by asking it on the support forum for SAP or SAPGUI itself. I googled the obvious search terms applescript sapgui and had no difficulty finding relevant results.
 

raditon

macrumors newbie
Apr 2, 2012
1
0
Hi all,

I meet same kind of problem when I upgrade from SAPGUI 7.10rev9 to SAPGUI 7.20rev6.
Anyone can help me to solve this problem?

thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.