Marlo Posted October 22, 2008 Posted October 22, 2008 (edited) This is just an idea i thought someone might like to expand on. Basicly it writes the contents of your clipboard to a temp file then runs it using /AutoIt3ExecuteScript. Pretty basic idea but very useful if your using these forums and very quickly want to test someones source. I have written a small example: $String = ClipGet() $File = FileOpen(@TempDir & "\DebugScript.au3", 2) $Code = StringReplace($String, "#include <", "#include <C:\Program Files\AutoIt3\Include\") $Code = StringReplace($Code, "#include<", "#include <C:\Program Files\AutoIt3\Include\") FileWrite($File, $Code) FileClose($File) ShellExecute(@ScriptFullPath, '/AutoIt3ExecuteScript "' & @TempDir & '\DebugScript.au3"') Hope this helps somebody Edited October 22, 2008 by Marlo Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
Minikori Posted October 22, 2008 Posted October 22, 2008 This is just an idea i thought someone might like to expand on. Basicly it writes the contents of your clipboard to a temp file then runs it using /AutoIt3ExecuteScript. Pretty basic idea but very useful if your using these forums and very quickly want to test someones source. I have written a small example: $String = ClipGet() $File = FileOpen(@TempDir & "\DebugScript.au3", 2) $Code = StringReplace($String, "#include <", "#include <C:\Program Files\AutoIt3\Include\") $Code = StringReplace($Code, "#include<", "#include <C:\Program Files\AutoIt3\Include\") FileWrite($File, $Code) FileClose($File) ShellExecute(@ScriptFullPath, '/AutoIt3ExecuteScript "' & @TempDir & '\DebugScript.au3"') Hope this helps somebodyAdd a FileDelete() to the end and a HotKeySet() for it all and you have your idea! Not really any need for expansion, I like it. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
Xand3r Posted October 23, 2008 Posted October 23, 2008 you could use stringregexpreplace for the include lines (so you can have as many blank spaces as you like) and also C:\Program files\Autoit3\Include\ should be RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt" , "InstallDir" , @ProgramFilesDir&"\Autoit3")&"\Include\" Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro
UltraFine Posted October 23, 2008 Posted October 23, 2008 a very good idea, but your script is not complete. also it will ClipGet() all the copied text and run it. you have to make it for only copying text from this site and run it.
YellowLab Posted October 23, 2008 Posted October 23, 2008 You could also compile it as a tray executable and have it hotkeyed. Great idea. Bob You can't see a rainbow without first experiencing the rain.
Minikori Posted October 23, 2008 Posted October 23, 2008 a very good idea, but your script is not complete. also it will ClipGet() all the copied text and run it. you have to make it for only copying text from this site and run it.Why? What if I find code on another site? Also with how it is you could make a settings GUI that allows multiple languages. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
ironmankho Posted October 23, 2008 Posted October 23, 2008 it is just good idea .form many days i am also seeing like this
Josbe Posted October 24, 2008 Posted October 24, 2008 [crazy idea]Another variation to your good idea, could be a FF extension or Greasemonkey script that reads the contents in the thread and insert a button at top of the every code tag for run code.[/crazy idea]Potentially harmful or potentially useful. Only a crazy idea. • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
kjcdude Posted October 24, 2008 Posted October 24, 2008 There's already an FF extension that works well.http://www.autoitscript.com/forum/index.php?showtopic=42990
Bozzman Posted October 24, 2008 Posted October 24, 2008 http://www.megaupload.com/?d=7QL5YLOVsimpel program i made
Cw2K1 Posted October 24, 2008 Posted October 24, 2008 http://www.megaupload.com/?d=7QL5YLOVsimpel program i madeany more information about your program? Enjoy the complexity.Feel the power of simplicity.
TehWhale Posted October 24, 2008 Posted October 24, 2008 [crazy idea] Another variation to your good idea, could be a FF extension or Greasemonkey script that reads the contents in the thread and insert a button at top of the every code tag for run code. [/crazy idea] Potentially harmful or potentially useful. Only a crazy idea. I would like that, that would be very useful
Bozzman Posted October 25, 2008 Posted October 25, 2008 i made this just for practicing but it's a tray program you select and copy a script here and click in tray or use shortcut ctrl+q and the script runs its just like the idea it makes a temp file in the temp folder
Cw2K1 Posted October 25, 2008 Posted October 25, 2008 i made this just for practicing but it's a tray program you select and copy a script here and click in tray or use shortcut ctrl+q and the script runsits just like the idea it makes a temp file in the temp folderthere is a FireFox Add-On which is good. and i use FireFox Enjoy the complexity.Feel the power of simplicity.
BrettF Posted October 25, 2008 Posted October 25, 2008 I'd like one that could open it in SciTe, and save it as the thread title... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Bozzman Posted October 25, 2008 Posted October 25, 2008 there is a FireFox Add-On which is good. and i use FireFox its just for me for practice and if someone wants it without firefox they can use thisupdated it a little now also opens in scite so you can save it youself (shortcuts= ctrl+q:run script-ctrl+w:open script-ctrl+s:quithttp://www.megaupload.com/?d=VFB42VV3ps does it work on your comuters??
TehWhale Posted October 25, 2008 Posted October 25, 2008 (edited) its just for me for practice and if someone wants it without firefox they can use this updated it a little now also opens in scite so you can save it youself (shortcuts= ctrl+q:run script-ctrl+w:open script-ctrl+s:quit http://www.megaupload.com/?d=VFB42VV3 ps does it work on your comuters?? Hey! You could post the source code and save us from downloading it, and also waiting 45 seconds. Post the code in your reply with [code ] [/code ] tags around it, just remove the spaces EDIT: Only post the source code if you want to, if not then upload it to another webhost like http://trashbin.nfshost.com/ Edited October 25, 2008 by TehWhale
Bozzman Posted October 25, 2008 Posted October 25, 2008 (edited) ok i made this building and change the code in the firs script:Phttp://pastebin.com/f51fc59ebtell me if i can make it better Edited October 25, 2008 by Bozzman
RWBaker Posted October 26, 2008 Posted October 26, 2008 ok i made this building and change the code in the firs script:Phttp://pastebin.com/f51fc59ebtell me if i can make it better I like the idea in your script and I am still playing around with your code to adapt to my needs. Here are some comments:1. Looks like the two "FileDelete($File)" statements should be: "FileDelete(@TempDir & "\DebugScript.au3")"2. I have actually removed these deletes because this allows the editing of the temp file and doing a "Save As". I placed "FileDelete(@TempDir & "\DebugScript.au3")" at the top of the script.3. I have added a "move" Hotkey to save the contents of the temp file.4. I've added a "help" HotKey.5. For my work I do not need to substitute full paths for the include files...so I have removed $Code (StringReplace).Thanks for the good work!RW Baker RW Baker
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