Diana (Cda) Posted March 20, 2008 Posted March 20, 2008 (edited) I've lived with this one so long, but it's really cumbersome and does weird things to the keyboard. A script I have opens up a text file on my USB flash drive. Whenever I've done this before and recorded the keystrokes, I get this: end("{CTRLDOWN}{END}") This freaks out the keyboard until I can "unlock it". Does anyone know of better syntax to go to the end of all text found in a document? What we get by pressing CTRL + END? Thanks! Edited March 28, 2008 by Diana (Cda)
Monamo Posted March 20, 2008 Posted March 20, 2008 (edited) I've lived with this one so long, but it's really cumbersome and does weird things to the keyboard. A script I have opens up a text file on my USB flash drive. Whenever I've done this before and recorded the keystrokes, I get this: end("{CTRLDOWN}{END}") This freaks out the keyboard until I can "unlock it". Does anyone know of better syntax to go to the end of all text found in a document? What we get by pressing CTRL + END? Thanks! ControlSend("test.txt - Notepad","","[CLASSNN:Edit1]","^{END}") Or be sure to send a {CTRLUP} after your existing send/controlsend so it knows to release the control key. Edited March 20, 2008 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
Diana (Cda) Posted March 28, 2008 Author Posted March 28, 2008 OMG, that works like a miracle. Can't believe I've been putting up with that Ctrl problem for so long. Granted, it was a couple of scripts I rarely used, but still. With the current script, it's a file that I use 2 or 3 times a day and it's just so kewl for the text file to open, then go to the bottom so it's just ready to enter data into. Far out. So here's the deal, whenever I use Send("{CTRLDOWN}{END}"), I just must follow at some point with Send("{CTRLUP}") to release the CTRL key. Send("{CTRLDOWN}{END}") ; be sure to use 'Send("{CTRLUP}")' at some point below to release the CTRL key. Sleep(500) Send("{CTRLUP}") ; this releases the CTRL key from the {CTRLDOWN} above. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now