steve8tch Posted February 18, 2004 Posted February 18, 2004 Filling in forms can be a pain - we have some that need to be all uppercase. I was looking to try and write a script that would help. I would highlight a line of text (This could be in a form or in a text document) I then want to hit a Hotkey (F?) The script would then look at the charactors highlighted and change any lowercase charactors to uppercase. I could do this several times on a form then save. Any ideas. Does AutoIt3 have a function that would read highlighted text ? Is there a workaround ? Thanks again for any help.
Somerset Posted February 18, 2004 Posted February 18, 2004 ok, here is some things that may help. lets say here in this posting that you could highligh and replace something ok. well to high light it you have to drag your cursor across the words. then if you used either of the following key combinations listing in no order. Select all = Ctrl + a Cut Highlighted = Ctrl + x Copy Highlighted = Ctrl + c Paste From clipboard = Ctrl + v now after knowing the above you can do basicly what you are talking about. once, copied or cut it is on the clipboard. which you can take into a script as a varible or string. have the script captiolize the letters then send it back to when you had either cut or copied it from. good luck.
steve8tch Posted February 18, 2004 Author Posted February 18, 2004 After I asked the question - I then did it in the same way as you were suggesting. Great minds think alike! or is it - Simple minds seldom differ. Thanks. What a great thing this Aut3 is..
Beastmaster Posted February 20, 2004 Posted February 20, 2004 If you're working with MS Word you could use SHIFT+F3 to change a (marked), mixed upper/lower case string to plain upper/lower case. If the Windows Scripting Host (WHS) is installed with your OS, you could use Visual Basic Script as well. There's a function which provides what you've requested (start the vbs file via A3's Run command)
steve8tch Posted February 20, 2004 Author Posted February 20, 2004 I just sent {CTRLDOWN}c{CTRLUP} to copy into clipboard and made changes to the text there and then pasted it back on itself. It works really well - I have been able to standardise databse entries and excel spreadsheet entries just by selecting the text and hitting F2. I can't believe how quick this Aut3 language is. I have highlighted large areas of excel spreadsheets - hit my F2 button and instantaneously all the changes have been made. What a great thing this Aut3 thing is....
scriptkitty Posted February 20, 2004 Posted February 20, 2004 Yea, they are quite simple to do. It is fun to make your own macro time savers. Quick hotkey example. HotKeySet("^!c", "Uppercase");Press ctrl+alt+c to change case. WinWaitActive("Random Name is","Never going to happen") Func Uppercase() send("^c") clipput(StringUpper (clipget())) send("^v") EndFunc AutoIt3, the MACGYVER Pocket Knife for computers.
jpm Posted February 20, 2004 Posted February 20, 2004 Yea, they are quite simple to do. It is fun to make your own macro time savers. Quick hotkey example. HotKeySet("^!c", "Uppercase");Press ctrl+alt+c to change case. WinWaitActive("Random Name is","Never going to happen") Func Uppercase() send("^c") clipput(StringUpper (clipget())) send("^v") EndFuncI prefer the Sleep(0) instead of WinWaitActive
scriptkitty Posted February 20, 2004 Posted February 20, 2004 sleep(0) just doesn't make much sence to me, it works, but always sounded like a bug.Sleep for zero miliseconds. hmmI like sleep(-1)Maximum sleep time is 2147483647 milliseconds (24 days).If you use a value less than 1, the script will pause indefinitely (useful with HotKeySet). AutoIt3, the MACGYVER Pocket Knife for computers.
Developers Jos Posted February 20, 2004 Developers Posted February 20, 2004 sleep(0) just doesn't make much sence to me, it works, but always sounded like a bug.Sleep for zero miliseconds. hmmI like sleep(-1)Sleep(0) sounds to me like "don't really STOP"Sleep(-1) sounds like traveling back in time.... ( that would be neat ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jpm Posted February 21, 2004 Posted February 21, 2004 Sleep <1 will sleep for ever that is saying the doc. I admit I should have right sleep(-1)
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