Source language: Translate to:


NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support


Postby Guest » Sat Nov 06, 2004 9:34 am

SendKeys "filename.exe" "{AltDn}A{AltUp}" sends command Alt+A to filename.exe, but what if I want to send the actual characters "{AltDn}..."? The answer, while not obvious, is easy to implement—replace each "{" with "{{ " = "{{[#32]" = leftbrace leftbrace space. This replacement is straightforward with NeoBook's StrReplace command.

Code: Select all
SetVar "[commands]" "{AltDn}A{AltUp}"
StrReplace "[commands]" "{" "{{[#32]" "[commands.converted]"
SendKeys "filename.exe" "[commands.converted]"

The filename.exe program receives the 15 characters "{AltDn}A{AltUp}" instead of the single command Alt+A.

Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 1 guest