mouse action help?

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Locked
User avatar
raj
Posts: 13
Joined: Tue Oct 25, 2005 10:20 am

mouse action help?

Post by raj »

Hi..

this the thing i'm trying to do..

1: when application open, mouse moves to the a point and triggers action
[Click] and shows a balloon text!

Code:

GetMousePos "[172]" "[166]"
SetMousePos "13" "92"
Balloon "Click here to open Menu"

2: how do i prevent it happening agin.. like when i go to another page and comeing backt to the previouse page!!

when i come back to the previouse page the actions trigger agine!!
i want to prevent this happening!

help and example would be great....

hope you understand what i'm trying to do?


thanks

Raj
User avatar
Cipolla
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany
Contact:

Post by Cipolla »

Raj,

Place the code in the BookProperties Startup section. It will only be executed once on startup.

If you need to place it inside the page actions, then you could i.e. use a flag to tell the script that this should only happen for the first start like this:

Code: Select all

If "[flag]" "<>" "False"
   GetMousePos "[172]" "[166]" 
   SetMousePos "13" "92" 
   Balloon "Click here to open Menu" 
   SetVar "[flag]" "False"
EndIf
On startup the content of the var [flag] is NULL or "nothing" and the if-action will be executed. After the balloon was shown the [flag] will be "False" so next time the if-action will not be executed.
Greetings from Germany
Klaus
User avatar
raj
Posts: 13
Joined: Tue Oct 25, 2005 10:20 am

Nice one Klaus...

Post by raj »

thanks Klaus,

worked beautifully..


thanks again

Raj
Locked