blackhydra866 Posted October 16, 2008 Share Posted October 16, 2008 Hello all, i'm a complete newbie to AutoIt and I have never actually made a script for it ever. So i've got a question for a script i'd like to make. I moderate and do work on a wiki page for a forum I go on, and it recently got hacked and i'm trying to rebuild it. And i'm able to view the old wiki and all the information via google cache but I can't actually edit the page and view the source of the formatting. So this means I have to do all the formatting of EVERYTHING by hand. So this is where I thought AutoIt could be of some help but I have no idea how to script. Basically i'd like a script that when I click somewhere in text it backspaces six times, makes an asterik, then two left brackets after that. Like this. *[[Testing 1 2 3 4 Because by default when i'm trying to format the wiki everything is like this * Testing 1 2 3 4 And would it be possible to run another script so when I click it adds two right brackets? Because I need most of the sections to look like this. *[[Testing 1 2 3 4]] But I can always just paste the two right brackets over everything so I don't think it would be a big deal. Also sorry if this sounds kind of confusing. Link to comment Share on other sites More sharing options...
Marlo Posted October 16, 2008 Share Posted October 16, 2008 (edited) This should do the trick. When you press 1 on the numpad it will do the 6 backspaces and send the *[[. Numpad 2 will do the ]] thing . HotKeySet("{NUMPAD1}", "_AddFirst") HotKeySet("{NUMPAD2}", "_AddSecond") While 1 WEnd Func _AddFirst() Send("{BACKSPACE 6}") Send("*") Send("[[") EndFunc Func _AddSecond() Send("]]") EndFuncoÝ÷ Ù.q©Ü©àzØ^nëm¢vòr§è§Ø^J{$¶«jgz»¢·±jjez'ò¢ì׶!jx×ë¢cnÖÚ-é^¶×«Yú+{¦¦Wébì(ºWe¢%G+ºÚ"µÍÝÙ^TÙ] ][ÝÝÉ][ÝË ][Ý×ÐYÝ ][ÝÊ Edited October 16, 2008 by Marlo Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
blackhydra866 Posted October 16, 2008 Author Share Posted October 16, 2008 Very cool, thank you, will try it out right now. Link to comment Share on other sites More sharing options...
blackhydra866 Posted October 16, 2008 Author Share Posted October 16, 2008 Also how would I do commands for moving the arrow keys about? Like for example having down, right, right, right pressed? I'll set it as my numpad 3. Link to comment Share on other sites More sharing options...
Marlo Posted October 16, 2008 Share Posted October 16, 2008 Here you go HotKeySet("{NUMPAD1}", "_AddFirst") HotKeySet("{NUMPAD2}", "_AddSecond") HotKeySet("{NUMPAD3}", "_AddThird") While 1 WEnd Func _AddFirst() Send("{BACKSPACE 6}") Send("*") Send("[[") EndFunc Func _AddSecond() Send("]]") EndFunc Func _AddThird() Send("{DOWN}") Send("{RIGHT 3}") EndFunc Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 16, 2008 Share Posted October 16, 2008 (edited) That seems like a waste of time, you could use End after "[[" and then do "]]" and make it all one func, like this: Func _AddFirst() Send("{BACKSPACE 6}") Send("*") Send("[[") Send("{END}") Send("]]") EndFunc Edited October 16, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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