PDA

View Full Version : Applescript SAP problems




erica.eym
May 13, 2011, 02:51 AM
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
May 13, 2011, 01:10 PM
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
Apr 2, 2012, 10:25 PM
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!