MaelstromOC Posted February 24, 2010 Posted February 24, 2010 So I've been using AutoIt for awhile now but I'm sure what I use it for can be sped up a good bit by a better written script. This is the current (and rather mundane, but works!) script that I've been using. expandcollapse popupOpt ("WinTitleMatchMode", 2) HotKeySet ( "{Esc}", "restart" ) HotKeySet ( "{ENTER}", "enter" ) Func restart() MouseClick ( "left", 1902, 1113, 25 ) If @Compiled = 1 Then Run( FileGetShortName(@ScriptFullPath)) Else Run( FileGetShortName(@AutoItExe) & "DescriptionsOO.au3" & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc Func enter() Send ( "^{s}" ) WinActivate ( "Opera" ) Send ( "^{w}" ) Winactivate ( "OpenOffice" ) HotKeySet ( "{ENTER}" ) Send ( "{ENTER}" ) HotKeySet ( "{ENTER}", "enter" ) EndFunc $i = 1 Do Winactivate ( "OpenOffice" ) MouseClick ( "left", 1211, 181, 1 ) Send ( "^{c}" ) WinActivate ( "Opera" ) Send ( "^+{v}" ) $i = $i + 1 Until $i = 2 Do WinActivate ( "OpenOffice" ) Send ( "{DOWN}" ) Send ( "^{c}" ) WinActivate ( "Opera" ) Send ( "^{t}" ) Send ( "^+{v}" ) $i = $i + 1 Until $i = 26 WinActivate ( "Opera" ) Send ( "^+{F6 24}" ) Winactivate ( "OpenOffice" ) Send ( "{RIGHT}" ) Send ( "{UP 24}" ) Sleep ( 100000000 ) As you can see it's a very simple script, but I was wondering if there's a way that I can open this data a bit faster (i.e. it takes it around 6 or 7 seconds to open 25 links when I'm sure that can be increased substantially.) I figured gathering the data into an array and being able to take the first array data and open in a new window in Opera, then take the second data, repeat, etc. I just don't understand how to actually do it
notsure Posted February 24, 2010 Posted February 24, 2010 What's the purpose of the script, i mean... what does it do?
jvanegmond Posted February 24, 2010 Posted February 24, 2010 (edited) To open a tab in Opera, try this line: ShellExecute("opera", "manadar.com") Edited February 24, 2010 by Manadar github.com/jvanegmond
dani Posted February 24, 2010 Posted February 24, 2010 (edited) I'm guessing you are opening many links that you have saved in an OpenOffice Calc sheet? Is there a particular reason you need to do it this way? If the links are the same every time, then please just use Opera to bookmark them once and afterwards open them all at the same time by clicking on "Open all folder items". If you somehow obtain a Calc sheet with different URLs every time which you have to open, try Manadar's suggestion in combination with the Excel UDF (#include <Excel.au3>). You can open Excel without showing its window and quickly queue the ShellExecute commands. Edited February 24, 2010 by d4ni
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