Jump to content

SLICER [AutoIt Forum Script Grabber]


Edano
 Share

How do you run .au3 files ?  

9 members have voted

  1. 1. How do you run .au3 files by default ?

    • Doubleclicking the .au3 file
      2
    • Rightclicking the .au3 file and "Run Script" (via Shell Menu)
      1
    • From Scite Console "Tools" -> "Go" (or F5)
      5
    • I first compile it and then run the .exe
      0
    • In a different way
      1


Recommended Posts

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:

post-79696-0-43560900-1373642925_thumb.j

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 by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

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

some scripts only contain a '0'. that is when  _IEBodyReadText($oIE)  returns 0 (error) instead of the text. this needs a solution. Solved

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

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 by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

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 by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

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 by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

.

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)
EndFunc

this 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 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 Gude
How 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

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

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

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

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

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

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 by ldub
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...