Source language: Translate to:

Read System variables

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Read System variables

Postby Wrangler » Tue Oct 17, 2006 4:04 pm

I'm playing with a program called AutoHotKeys. It creates and stores data in system variables. For example, the contents of the clipboard are contained in %clipboard%. Is there a way to retrieve the data in these variables to use in Neobook?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby HPW » Tue Oct 17, 2006 10:32 pm

When this is a system-wide enviroment-variable then you may try hpwGetEnv from hpwControl.
(Of cource noebook has direkt clipboard access) ;-)
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Wrangler » Wed Oct 18, 2006 7:42 am

Thanks, Hans! I quickly had gone through the actions of all my plugs, and I missed that one.

And I know about Neobook and using the clipboard. AutoHotKey has a command called clipwait. It sits in the background and monitors the clipboard. When data is put on the clipboard, it is stored in %clipboard%. I just needed to be able to retrieve the data.

PS: I see you've upgraded all your plugs. Great job. :wink:
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby HPW » Wed Oct 18, 2006 7:50 am

Can you not monitor the clipboard from a neobook timer object?
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Wrangler » Wed Oct 18, 2006 8:14 am

Yes I could. But AutoHotKeys uses a small script file, and I have the ability to add other of it's commands which perform Windows functions etc., and can change them on the fly. The clipboard was really just an example to extract the valuable answer you gave me. Since you can create your own system wide variables with it, and the fact it uses these variables for many other commands, being able to retrieve this data makes AutoHotKeys a powerful little tool to do some of the things Neobook either can't, or requires more coding to accomplish.

The script files can be compiled, using a modified version of the AutoIt compiler included. You can also password protect the file. It can easily create a GUI, such as an image viewer, or simple text editor.

Actually, it does more than I can list. Take a look here:
http://www.autohotkey.com/docs/Scripts.htm

Good to have in the toolbox. :)

Thanks to Horst Helfen for making me aware of this little program in another post.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Neosoft Support » Wed Oct 18, 2006 3:16 pm

NeoBook's SystemInfo action can also be used to obtain the contents of a system environment variable. For example:

SystemInfo "%clipboard%" "[Result]"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Wrangler » Wed Oct 18, 2006 3:18 pm

Hay, thanks, Dave. Didn't know that one. :oops:
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Wrangler » Thu Oct 19, 2006 8:20 am

Info for anyone else who is playing with this:

Instead of:

SystemInfo "%clipboard%" "[Result]"

which doesn't work, should be:

SystemInfo "clipboard" "[Result]"

which does work.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: HPW and 1 guest

cron