Source language: Translate to:

mouse action help?

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

mouse action help?

Postby raj » Tue Apr 25, 2006 3:43 am

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
raj
 
Posts: 13
Joined: Tue Oct 25, 2005 10:20 am

Postby Cipolla » Tue Apr 25, 2006 4:56 am

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
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Nice one Klaus...

Postby raj » Tue Apr 25, 2006 9:30 am

thanks Klaus,

worked beautifully..


thanks again

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


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests