kcvinu Posted June 20, 2016 Share Posted June 20, 2016 Hi all, This is my doubt. Is it possible to run the autoit code from the forum ?. If somebody add that feature to forum, it will be very easy for learners to try the code snippet in various forums. Just add another button to run and stop the code. And ofcourse, a console window too needed. If that is not possible, atleast, is it possible to add a "Copy to Clipboard" button to forum, so that we can easily copy the code and paste into our own ide. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 20, 2016 Moderators Share Posted June 20, 2016 Do you honestly think it would be advisable to be able to run code right in the browser from a web page, when there's no telling who is putting what in there? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
kcvinu Posted June 20, 2016 Author Share Posted June 20, 2016 (edited) @JLogan3o13 , I don't know the techincal details, but its just my wish. I have seen so many websites run code and display result. Edit - Ok, If it is not advisable, then what about adding a copy to clipboard button ? Edited June 20, 2016 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
BrewManNH Posted June 20, 2016 Share Posted June 20, 2016 How hard is it to hit CTRL + C? EmilyLove 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
water Posted June 20, 2016 Share Posted June 20, 2016 1 hour ago, kcvinu said: Is it possible to run the autoit code from the forum ? To run AutoIt code directly from the forum would be a security nightmare. So you need to stick with Ctrl + c My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Mannyfresh15 Posted June 20, 2016 Share Posted June 20, 2016 People these days.... Link to comment Share on other sites More sharing options...
Danyfirex Posted June 20, 2016 Share Posted June 20, 2016 (edited) Create your one function. a hotkey. then you select some autoit code in forum press you hotkey and create a temp file open with Scite and run it. Saludos Edited June 20, 2016 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
kcvinu Posted June 21, 2016 Author Share Posted June 21, 2016 Ok, i can understand. But the entire copy process needs this much steps. 1. Click the "Popup" button 2. Click on the poped up window. 3. Press Ctrl + A to select all 4. Press Ctrl + C to copy. All i am asking to make it to one step. Just add a Copy button. That's all. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
kcvinu Posted June 21, 2016 Author Share Posted June 21, 2016 @Danyfirex , I am planning/making something like that. Will be released soon. And that is not only for me, but also entire forum. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 21, 2016 Moderators Share Posted June 21, 2016 Seriously, four clicks is worth all this? And yet you have the patience to code? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RyukShini Posted June 21, 2016 Share Posted June 21, 2016 I really don't see anyone who will use this? its so simple and quite fast imo. Double click code, CTRL+A, CTRL+C Come one, are you that laizy Link to comment Share on other sites More sharing options...
Danyfirex Posted June 28, 2016 Share Posted June 28, 2016 Hello. My brother and I wrote this small Google Chrome extension that allow load(No Run Directly. you must press F5) the code directly in SciTE. By default Scritps are saved in Desktop when you run it. How to Install: In host Folder Run install_host.bat (try to keep an static folder) If you move the folder after you run install_host.bat You must install again. Load The Extension (autoitextension Folder) as Developer Mode In Google Chrome Settings. You can edit AutoitCodeRunner.au3 to make it work as your need. How it works. Basically It Injects a "Run" Button in every AutoIt code tag Like This: Check Source for more details. AutoItCodeRunner.zip Regards Simpel, kcvinu and Deye 2 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
kcvinu Posted June 28, 2016 Author Share Posted June 28, 2016 (edited) @Danyfirex , That's great. Thanks for the help. I am developing a script to do this task. But it is not completed. This is the working scenario. 1. After starting program, it asks you to enter the link of the page. -------- You only need to hover the mouse above a text box. It will paste automatically. 2. Then the program asks to enter the post number without # key. 3. Now, this program uses _INetGetSource function to download the source of that webpage. 4. Then the program search for "#PostNum" to find the desired post. 5. Then it will search for "#PostNum + 1" to find the ending boundary of the desired post. If not found, last letter of source text will be the boundary. 6. Then this program will strip all text related to #PostNum. 7. Then it will search for "ipsCode">". Which is the starting position of autoit code in that post. 8. Then it will search for "</pre>" . Which is the ending position of autoit code. 9. Now we got the autoit code with some java script codes (mostly @CRLF and @Tab). Next task is to replace the java script code with appropriate autoit chars. 10. Last but not least, save the autoit code somewhere and open it in SciTE. So simple. No regex, only native functions. But i have completed only 8 steps and working on step 9. Anyhow, let me test your tool. Thanks Edited June 28, 2016 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
kcvinu Posted June 28, 2016 Author Share Posted June 28, 2016 @Danyfirex , Great!! That works like a charm... But it's saving location is Desktop. Can i change it ? I cant find anything related to saving path in that au3 file. Anyway, this program makes an urge in me to learn javascript asap. Thanks for this help. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
EmilyLove Posted June 28, 2016 Share Posted June 28, 2016 (edited) Here's something I just wrote up. It copies the contents of the clipboard to a file, asks the user if they are sure they want to run this code, and if yes then runs it. You could Pin this script in the Taskbar and run it after copying the script into your clipboard. You could also create a shortcut to the script and set a hotkey using the shortcut properties page. expandcollapse popup#include <Date.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> ;~~~ Options Global $WinTitle = "RunFromClipboard" Global $AutoItRun = "C:\PortableApps\AutoIt3 Portable\AutoIt3 Portable.exe" ;Set this to the location for either AutoIt3.exe or AutoIt3_x64.exe ;~~~ If FileExists($AutoItRun) = 0 Then MsgBox($MB_ICONERROR,$WinTitle,"AutoIt was not detected. Please set the $AutoItRun variable.") Exit EndIf Global $tCur = _Date_Time_GetLocalTime() Global $stCur = _Date_Time_SystemTimeToDateTimeStr($tCur) Global $DateTime = StringReplace($stCur,":","-") $DateTime = StringReplace($DateTime,"\","-") $DateTime = StringReplace($DateTime,"/","-") Global Const $AutoItTempDir = @TempDir & "\BetaLeaf Software\RunFromClipboard\" Global Const $AutoItTempFile = $AutoItTempDir & "Script " & $DateTime & ".au3" Global $g_idMemo _ClipboardToFile() _PreviewScript() ;Comment this line out if you don't want to see a preview and just want to run right away. _RunScript() Func _ClipboardToFile() Local $Clipboard = ClipGet() If $Clipboard = "" Then MsgBox($MB_ICONERROR, $WinTitle, "The Clipboard is empty.") Exit EndIf Local $hFile = FileOpen($AutoItTempFile,$FO_OVERWRITE+$FO_CREATEPATH) If $hFile = -1 Then MsgBox($MB_ICONERROR, $WinTitle, "Could not open temp file." & @CRLF & $AutoItTempFile) Exit EndIf Local $iFileWriteRet = FileWrite($hFile, $Clipboard) If $iFileWriteRet = 0 Then MsgBox($MB_ICONERROR, $WinTitle, "Could not write contents of clipboard to file." & @CRLF & $AutoItTempFile) Exit EndIf Local $iFileCloseRet = FileClose($hFile) If $iFileCloseRet = 0 Then MsgBox($MB_ICONERROR, $WinTitle, "Could not close file." & @CRLF & $AutoItTempFile) Exit EndIf EndFunc ;==>_ClipboardToFile Func _PreviewScript() ; Create GUI GUICreate($WinTitle&" - Preview", 400, 300) $g_idMemo = GUICtrlCreateEdit("", 2, 2, 396, 296, $WS_VSCROLL) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUISetState(@SW_SHOW) MemoWrite(FileRead($AutoItTempFile)) $iMsgBoxRet=MsgBox($MB_ICONINFORMATION+$MB_YESNO,$WinTitle,"Are you sure you want to run this script?") GUISetState(@SW_HIDE) if $iMsgBoxRet <> $IDYES then Exit EndFunc ;==>_PreviewScript Func _RunScript() if ShellExecute($AutoItRun,'"'&$AutoItTempFile&'"') = 0 Then MsgBox($MB_ICONERROR,$WinTitle,"Failed to create process.") Exit EndIf EndFunc Func MemoWrite($sMessage) GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite Here's a sample hello world for you all to test with. Msgbox(0,"Test","Hello World") Edited June 28, 2016 by BetaLeaf Added sample. Link to comment Share on other sites More sharing options...
kcvinu Posted June 28, 2016 Author Share Posted June 28, 2016 (edited) @BetaLeaf , Interesting... Thanks for this script. Let me test your script. As far as i know, i need to copy the code from the browser. Pls correct me if i am wrong. Anyway, Danyfirex's solution needs a single click on this run button. It's like you are reading the code in the help file. Just a click, SciTE is open with your code. Edited June 28, 2016 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
EmilyLove Posted June 28, 2016 Share Posted June 28, 2016 27 minutes ago, kcvinu said: @BetaLeaf , Interesting... Thanks for this script. Let me test your script. As far as i know, i need to copy the code from the browser. Pls correct me if i am wrong. Anyway, Danyfirex's solution needs a single click on this run button. It's like you are reading the code in the help file. Just a click, SciTE is open with your code. You are correct. You also need to set the options, specifically the $AutoItRun to point to the correct path. While I like the idea of a chrome extension, if you sync chrome on multiple computers, it may cause problems if autoit is in the wrong location/isn't installed. kcvinu 1 Link to comment Share on other sites More sharing options...
kcvinu Posted June 28, 2016 Author Share Posted June 28, 2016 @BetaLeaf , Yeah, you are correct. And fortunately, i am using chrome in a single pc. EmilyLove 1 Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
EmilyLove Posted June 28, 2016 Share Posted June 28, 2016 Just now, kcvinu said: @BetaLeaf , Yeah, you are correct. And fortunately, i am using chrome in a single pc. I am too but I have a portable version of chrome I use sometimes. I also have a portable version of autoit as you might have already noticed. kcvinu 1 Link to comment Share on other sites More sharing options...
kcvinu Posted June 28, 2016 Author Share Posted June 28, 2016 @BetaLeaf, So , you didn't tested Danyfirex's extension yet ? Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) 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