JoshDB Posted November 8, 2007 Share Posted November 8, 2007 (edited) Hope this helps others as much as it helps me. Quick and dirty, lacking features, and ties up your Shift-Up / Shift-Down capabilities while running - Thankfully I don't use that much anyways. I just Shift-Click to select text.How to use:Highlight a letter on any text entry field (website form, MS Word, Notepad, etc.) and press Shift-Up or Shift-Down. If possible (and if I've added it), the letter will cycle. For example, a becomes à.Inspired by this GreaseMonkey script.To do:Add scroll wheel functionalityexpandcollapse popup#include <Array.au3> HotKeySet( '+{UP}' , 'UpChr' ) HotKeySet( '+{DOWN}' , 'DownChr' ) Global $Chrs[1] addChr ( 'e' , 'e' ) addChr ( Chr ( 232 ) , 'e' ) addChr ( Chr ( 233 ) , 'e' ) addChr ( Chr ( 234 ) , 'e' ) addChr ( Chr ( 235 ) , 'e' ) addChr ( 'i' , 'i' ) addChr ( Chr ( 236 ) , 'i' ) addChr ( Chr ( 237 ) , 'i' ) addChr ( Chr ( 238 ) , 'i' ) addChr ( Chr ( 239 ) , 'i' ) addChr ( 'o' , 'o' ) addChr ( Chr ( 242 ) , 'o' ) addChr ( Chr ( 243 ) , 'o' ) addChr ( Chr ( 244 ) , 'o' ) addChr ( Chr ( 245 ) , 'o' ) addChr ( Chr ( 246 ) , 'o' ) addChr ( Chr ( 240 ) , 'o' ) addChr ( 'a' , 'a' ) addChr ( Chr ( 224 ) , 'a' ) addChr ( Chr ( 225 ) , 'a' ) addChr ( Chr ( 226 ) , 'a' ) addChr ( Chr ( 227 ) , 'a' ) addChr ( Chr ( 228 ) , 'a' ) addChr ( Chr ( 229 ) , 'a' ) addChr ( 'u' , 'u' ) addChr ( Chr ( 249 ) , 'u' ) addChr ( Chr ( 250 ) , 'u' ) addChr ( Chr ( 251 ) , 'u' ) addChr ( Chr ( 252 ) , 'u' ) addChr ( Chr ( 361 ) , 'u' ) addChr ( 'n' , 'n' ) addChr ( Chr ( 241 ) , 'n' ) addChr ( 'c' , 'c' ) addChr ( Chr ( 231 ) , 'c' ) addChr ( Chr ( 263 ) , 'c' ) addChr ( '?' , '?' ) addChr ( Chr ( 191 ) , '?' ) addChr ( '!' , '!' ) addChr ( Chr ( 161 ) , '!' ) Func addChr ( $NewChr , $OldChr ) $Pos = _ArraySearch ( $Chrs , $OldChr ) Select Case $Pos = -1 _ArrayAdd ( $Chrs , 1 ) _ArrayAdd ( $Chrs , $OldChr ) ;~ _ArrayDisplay ( $Chrs ) Case Else _ArrayInsert ( $Chrs , $Pos + $Chrs[$Pos - 1] , $NewChr ) ;~ $Chrs[$Pos - 1] += 1 ;~ _ArrayDisplay ( $Chrs ) EndSelect EndFunc Func UpChr ( ) $Clip = ClipGet ( ) Send( '^c' ) $Chr = ClipGet ( ) $NewChr = $Chr $Pos = _ArraySearch ( $Chrs , $Chr ) Select Case $Pos = -1 Case Else $NewChr = $Chrs[$Pos + 1] If IsNumber ( $NewChr ) Then For $i = $Pos To 0 Step -1 If IsNumber ( $Chrs[$i] ) Then $NewChr = $Chrs[$i + 1] ExitLoop EndIf Next EndIf EndSelect ClipPut ( $NewChr ) Send( '^v' ) Send( '+{LEFT}' ) ClipPut ( $Clip ) EndFunc Func DownChr ( ) $Clip = ClipGet ( ) Send( '^c' ) $Chr = ClipGet ( ) $NewChr = $Chr $Pos = _ArraySearch ( $Chrs , $Chr ) Select Case $Pos = -1 Case Else $NewChr = $Chrs[$Pos - 1] If IsNumber ( $NewChr ) Then For $i = $Pos To 999 Step 1 If IsNumber ( $Chrs[$i] ) Then $NewChr = $Chrs[$i - 1] ExitLoop EndIf Next EndIf EndSelect ClipPut ( $NewChr ) Send( '^v' ) Send( '+{LEFT}' ) ClipPut ( $Clip ) EndFunc Do $Quit = 0 Until $Quit = 1 Edited November 8, 2007 by JoshDB Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
MaudKip Posted November 8, 2007 Share Posted November 8, 2007 (edited) Very cool. I like the idea. =D However, for some odd reason when I select the text and press shift+up the character only ever turns into a five. And if I press shift+down, the script errs with the following message. CODE>"H:\au3\SciTe\..\autoit3.exe" /ErrorStdOut "H:\thingyidk.au3" H:\thingyidk.au3 (124) : ==> Array variable subscript badly formatted.: $NewChr = $Chrs[$Pos - 1] $NewChr = $Chrs[^ ERROR >Exit code: 1 Time: 6.463 I am extremley limited in my knowlage of autoit so I hope that a member with more senoirity and knowlage on the subject will be able to help you along. =] Suugestions: Add a hotkeyset to toggle the functionality of the script. i.e. Press (some hotkey) and the script is enabled so that when you press shift+up/down it does as it is supposed too. Press (some hotkey) again and the script is disabled. This will allow you to free up your shift+up/down. This would be useful in seeing as I use shift+up/down alot. Well I hope I was of some help and I hope I didn't ramble too much. =] Edited November 8, 2007 by MaudKip Link to comment Share on other sites More sharing options...
JoshDB Posted November 9, 2007 Author Share Posted November 9, 2007 I should note that this requires beta - Check to see if updating AutoIt to the latest beta version solves your problem. Other than that I don't know what your problem could be, and I don't want to muck about trying to figure out what's wrong. That might sound unhelpful... And now that I think about it, it is. lol... I created this in about 10 mins and basically ported it from JS to AU3 to help with my Spanish homework. If I ever find a use for this outside of my homework then I'll make it an uber 1337 app, but for now it's provided as-is. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
Klaatu Posted November 9, 2007 Share Posted November 9, 2007 What functionality of the beta is being used here? I don't see it... My Projects:DebugIt - Debug your AutoIt scripts with DebugIt! Link to comment Share on other sites More sharing options...
MaudKip Posted November 9, 2007 Share Posted November 9, 2007 I should note that this requires beta - Check to see if updating AutoIt to the latest beta version solves your problem. Other than that I don't know what your problem could be, and I don't want to muck about trying to figure out what's wrong. That might sound unhelpful... And now that I think about it, it is. lol...I created this in about 10 mins and basically ported it from JS to AU3 to help with my Spanish homework. If I ever find a use for this outside of my homework then I'll make it an uber 1337 app, but for now it's provided as-is.Damn you sound bitter.I'm not gonna bother with beta. Link to comment Share on other sites More sharing options...
JoshDB Posted November 11, 2007 Author Share Posted November 11, 2007 Damn you sound bitter.I'm not gonna bother with beta.Oh sorry man I didn't mean to sound bitter or mean - Actually I was laughing to myself about how lazy I am.Sorry if I sounded mean or anything, that wasn't my intention. I should watch my tone more, I suppose. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
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