Edano Posted July 7, 2013 Share Posted July 7, 2013 (edited) Tired of popping up codes, copying, pasting to Scite, running example scripts ? Try my little helper: SLICER [AutoIt Forum Script Grabber] (final version) What does it do ? It searches the current forum site for AutoIt scripts and lists them together with the avatar, member name and post #. You can doubleclick the list to run the specified script, or rightclick to get more options (currently Edit and Save Script, and Delete List). Screenshot: Only AutoIt-tagged scripts are recognized. Sometimes SLICER reacts slow and lazy. Since it sometimes refuses to grab the current site, I added the alternative to drag and drop the url into the GUI, so you can force slicing it. Besides some shortcomings, it works really smart. SLICER (purposely) alters some scripts, e.g. the old Adlib functions get replaced by the new ones, and ConsoleWrite is exchanged with ToolTip. I hope nobody minds. The script can be paused via traymenu. Those who do not use IE for browsing, will possibly find the "Kill IE" function useful, because residual IE instances can block the InetRead process from time to time. it is a sort of "debugging". The code is short but mighty : . taken down . So have fun and gimme some feedback, compañeros ... Edano . Edit: I am not sure if it works with all browsers and on all OS. Internet Explorer sometimes truncates the titles. . Edit: new version Edit: script "cleaned up" Edit: added drag and drop functionality and some other features Edit: improved drag & drop and changed the script name Edited August 16, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 7, 2013 Moderators Share Posted July 7, 2013 I done something similar as a Firefox extension. Unfortunately, I now use Chrome as my default browser. Link to comment Share on other sites More sharing options...
Edano Posted July 7, 2013 Author Share Posted July 7, 2013 I done something similar as a Firefox extension. Unfortunately, I now use Chrome as my default browser. . please try it with chrome. i only tested ie and firefox. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted July 7, 2013 Author Share Posted July 7, 2013 (edited) some scripts only contain a '0'. that is when _IEBodyReadText($oIE) returns 0 (error) instead of the text. this needs a solution. Solved Edited July 9, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted July 9, 2013 Author Share Posted July 9, 2013 (edited) new version, some improvements. thanks for the enthusiastic comments. i don't think i will update it again. PS don't try the script with this page, because two instances of this script won't cooperate properly. fixed Edited July 14, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
lorenkinzel Posted July 10, 2013 Share Posted July 10, 2013 I see by the screenshot that you have it fully working, so why do I get errors? xxx.au3(229,16) : ERROR: _Focus() called by a previous line with 0 arg(s). Min = 1. First previous line calling this Func is 174. Win XP, 3.3.8.1 Link to comment Share on other sites More sharing options...
Edano Posted July 10, 2013 Author Share Posted July 10, 2013 (edited) I see by the screenshot that you have it fully working, so why do I get errors? xxx.au3(229,16) : ERROR: _Focus() called by a previous line with 0 arg(s). Min = 1. First previous line calling this Func is 174. Win XP, 3.3.8.1 . same system here winxp, 3.3.8.1. no error. weird. will investigate it aaah..... you run it from scite console. just run the script directly. no error. it is the au3 check that is faulty. Edited July 10, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted July 10, 2013 Author Share Posted July 10, 2013 (edited) au3 check also says InetRead() is an "undefined function" .... ??? okay, i CAN fix the au3 check error with the _Focus() function, but still au3 check won't execute the script because ERROR: InetRead(): undefined function. .. this is complete nonsense. conclusion: Don't run this scrpit from the scite console, only run it DIRECTLY from the file. code adapted Edited July 14, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
BrewManNH Posted July 10, 2013 Share Posted July 10, 2013 (edited) .same system here winxp, 3.3.8.1. no error. weird. will investigate it aaah..... you run it from scite console. just run the script directly. no error. it is the au3 check that is faulty.This error is because you're using OnEvent mode and _Focus is one of the functions tied to a control. You can't use functions that accept parameters with OnEvent control events. You should rather have your OnEvent function pass the information to the _Focus function, rather than referencing the _Focus function directly. GUICtrlSetOnEvent(-1, "__Focus") Func __Focus() _Focus(@GUI_CtrlId) EndFuncthis is complete nonsense. conclusion: Don't run this scrpit from the scite console, only run it DIRECTLY from the file.This isn't complete nonsense, this is you not understanding the language and it's limitations and the way things work. Edited July 10, 2013 by BrewManNH 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...
Edano Posted July 10, 2013 Author Share Posted July 10, 2013 since the script runs without error, while au3 check throws out an error, it is obvious that au3 check is flawed, not my "understanding of the language". [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
lorenkinzel Posted July 10, 2013 Share Posted July 10, 2013 BrewManNH That fixed it right up. More importantly, removed many of my limitations for using OnEvent mode. Out of curiosity, is it that the script would run without error or that the script would still run despite errors? Edano I love it. Putting the URL & post # at the top is a nice touch. Link to comment Share on other sites More sharing options...
Edano Posted July 10, 2013 Author Share Posted July 10, 2013 BrewManNH That fixed it right up. More importantly, removed many of my limitations for using OnEvent mode. Out of curiosity, is it that the script would run without error or that the script would still run despite errors? Edano I love it. Putting the URL & post # at the top is a nice touch. . oh thanks. i still try to improve the page and url recognition so that it gets more reliable . [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
0xdefea7 Posted July 11, 2013 Share Posted July 11, 2013 new version, some improvements. thanks for the enthusiastic comments. i don't think i will update it again. PS don't try the script with this page, because two instances of this script won't cooperate properly. You should add the _Singleton function and return if your script is running 2 instances. That will solve that issue for you. Link to comment Share on other sites More sharing options...
Edano Posted July 11, 2013 Author Share Posted July 11, 2013 thanks, i used this instead at the beginning: If WinExists("AFSG by Edano") Then Exit WinActivate("AFSG by Edano") [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted July 11, 2013 Author Share Posted July 11, 2013 posted a new version, probably final. i am quite satisfied now with the results. added the url-drag-and-drop feature. E. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted July 12, 2013 Author Share Posted July 12, 2013 updated script once again. improved url drag drop. finally found an adequate name for it: SLICER ! [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
ldub Posted July 12, 2013 Share Posted July 12, 2013 (edited) Hi ! I get these errors (I'm runnning on Windows XP) : Func _List(ByRef $url) ~~~~~~~~~~~~~~~~~~~~~~^ D:AutoItSlicer.au3(101,23) : REF: first call to _List(). _List($url) ~~~~~~~~~~~~~~~~~~~~~~^ D:AutoItSlicer.au3(252,16) : ERROR: _Focus() called by a previous line with 0 arg(s). Min = 1. First previous line calling this Func is 218. Func _Focus($t) ~~~~~~~~~~~~~~~^ D:AutoItSlicer.au3(253,53) : ERROR: $t already declared as parameter. If Not IsDeclared("t") Then Local $t=@GUI_CtrlId ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:AutoItSlicer.au3 - 3 error(s), 0 warning(s) !>18:42:03 AU3Check ended. Press F4 to jump to next error.rc:2 >Exit code: 2 Time: 0.488 Edited July 12, 2013 by ldub Link to comment Share on other sites More sharing options...
Edano Posted July 12, 2013 Author Share Posted July 12, 2013 please see above posts. run it directly from the file, not by scite console. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 12, 2013 Moderators Share Posted July 12, 2013 Edano,As you have been told before, this is a major flaw in your understanding of AutoIt's OnEvent mode which will at some point crash the script. You cannot have parameters in a function called by an OnEvent call. BrewManNH suggested how you might amend it above - I would strongly suggest that you implement his solution at the earliest opportunity. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ldub Posted July 12, 2013 Share Posted July 12, 2013 How to "run it DIRECTLY from the file" ? Thank's for your help... 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