I cannot get the following script to work. The shiftKey_Var_1 variable is set to the right value, but nothing appears to happen in the notepad window.
Any suggestion?
//
setfocus>t.txt*
gosub>shiftKey,LF
Exit
srt>shiftKey
press shift
let>PRESS_ALLOWVARS=1
press shiftKey_Var_1
let>PRESS_ALLOWVARS=0
release shift
Wait>0.1
END>shiftKey
Press variable name within subroutine, can't get it work
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1380
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Press variable name within subroutine, can't get it work
It looks to me like the subroutine/variable issue may be a red herring.
LF is not in the list of accepted Press commands. You can Send>LF though.
If I simply try the following, nothing happens :
Whereas if I use a subroutine for Press Enter, it works :
LF is not in the list of accepted Press commands. You can Send>LF though.
If I simply try the following, nothing happens :
Code: Select all
setfocus>*Untitled*
press LF
Code: Select all
setfocus>*Untitled*
gosub>shiftKey,Enter
srt>shiftKey
let>PRESS_ALLOWVARS=1
Press shiftKey_Var_1
let>PRESS_ALLOWVARS=0
Wait>0.1
END>shiftKey
Yes, we have a Custom Scripting Service. Message me or go here
Re: Press variable name within subroutine, can't get it work
Thanks, indeed with Enter it works. And my mistake to make a simple test! The issue is that I needed a shift TAB, however Notepadd++ does not record a shift Tab, so it is being send after all.
I am a bit confused what to use in the Press command: Key names and/or System Variables? The latter lists, for example:
CR Crriage Return
LF Line Feed
CRLF Carriage Return, Line Feed Combination (to force a new line)
TAB Tab character
I am a bit confused what to use in the Press command: Key names and/or System Variables? The latter lists, for example:
CR Crriage Return
LF Line Feed
CRLF Carriage Return, Line Feed Combination (to force a new line)
TAB Tab character
- Dorian (MJT support)
- Automation Wizard
- Posts: 1380
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Press variable name within subroutine, can't get it work
This gives me a Shift+Tab in Notepad++
Or am I misunderstanding?
EDIT: The following is a complete list of all commands you can use with Press is here.
Code: Select all
setfocus>*new 3*
gosub>shiftKey,TAB
srt>shiftKey
press shift
let>PRESS_ALLOWVARS=1
Press shiftKey_Var_1
let>PRESS_ALLOWVARS=0
release shift
Wait>0.1
END>shiftKey
EDIT: The following is a complete list of all commands you can use with Press is here.
Yes, we have a Custom Scripting Service. Message me or go here