Leaderboard
Popular Content
Showing content with the highest reputation on 06/05/2013 in all areas
-
HiHo Forum, I'm currently implementing a custom file extension filter into SMF's report, and I've noticed that this is a wheel that get's re-invented all the time. So I made this post as a reference and for further discussion. Here's what I've got up to now. Do you see any mismatches / missing groups, or do you have a better wording for the group names etc.? The list is far from perfect and still needs lot's of optimization. My goal is to establish a "de facto" standard for File Filter groups and sub-groups, so feel free to add, change and criticize ... Audio (*.flac;*.m3u;*.m4a;*.mid;*.mp3;*.mpa;*.ra;*.wav;*.wma) Compressed (*.7z;*.ace;*.arj;*.cab;*.cbr;*.jar;*.rar;*.tar.gz;*.zip) Disk Image (*.bin;*.ccd;*.cue;*.img;*.iso;*.mdf;*.mds;*.nrg) Document (*.doc;*.docm;*.docx;*.dotm;*.dotx;*.pdf;*.rtf) Executable (*.bat;*.cmd;*.com;*.cpl;*.dll;*.exe) Image (*.bmp;*.gif;*.ico;*.jpeg;*.jpg;*.png;*.psd;*.tga;*.tif) Office (*.accdb;*.accde;*.accdr;*.accdt;*.csv;*.dbf;*.doc;*.docm;*.docx;*.dotm;*.dotx;*.mdb;*.mde;*.odg;*.odp;*.ods;*.odt;*.otp;*.ots;*.ott;*.pot;*.potm;*.potx;*.ppam;*.pps;*.ppsm;*.ppsx;*.ppt;*.pptm;*.pptx;*.rtf;*.sldm;*.sldx;*.thmx;*.txt;*.xlam;*.xll;*.xls;*.xlsb;*.xlsm;*.xlsx;*.xltm;*.xltx) Text (*.au3;*.bak;*.bat;*.c;*.cfg;*.cgi;*.conf;*.cpp;*.css;*.h;*.htm;*.html;*.inf;*.ini;*.java;*.js;*.log;*.lst;*.nfo;*.php;*.php3;*.pl;*.py;*.reg;*.txt;*.xml) Video (*.3g2;*.3gp;*.asf;*.asx;*.avi;*.divx;*.flv;*.m4v;*.mkv;*.mov;*.mp4;*.mpeg;*.mpg;*.ogv;*.rm;*.swf;*.ts;*.vob;*.wmv) Web (*.asp;*.htm;*.html;*.js;*.mht;*.php;*.php3;*.pl;*.py;*.xml) _FileFilter_Extensions_List_v01.zip Regards1 point
-
Still not seeing the issue, I added WinActivate and WinActive to the mix with the class for the title and it's working for me (even in F7 mode). ControlClick("[CLASS:TMainForm]", "", "[CLASS:TImageButton; INSTANCE:3]") $aArray = WinGetPos("[CLASS:TMainForm]") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aArray = ' & $aArray[0] & " - " & $aArray[1] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console Sleep(2000) ; used to show that the above commands aren't making the window active by themself, the winactivate is bringing it into focus ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : WinActivate("[CLASS:TMainForm]") = ' & WinActivate("[CLASS:TMainForm]") & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : Winactive("[CLASS:TMainForm]") = ' & WinActive("[CLASS:TMainForm]") & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console1 point
-
Manage mutil GUI?
DucViet321 reacted to Melba23 for a topic
DucViet321, Use GUISwitch to set the GUI in which controls shoudl be created. M231 point -
To succeed in programming, one needs to have their critical thinking cap on at all times. It pays to step through the code, and ask yourself, what it is doing at each point/line plus what you are wanting or expecting it to do. It's a two way process.1 point
-
The funny thing was not that we answered quickly, but we all answered at the same minute.1 point
-
1 point
-
@olo - How can you expect that to exit, when it doesn't ask for or return a value? EDIT The others have given it to you on a platter ... I would have made you work harder for it ... use a few brain cells even.1 point
-
While 1 If MyFunc() = 0 Then ExitLoop WEnd Func MyFunc() ;do stuff Return 1 ;success Return 0 ;failure EndFunc1 point
-
; So Return True in that function e.g. While 1 If Test_Assert() Then ExitLoop EndIf WEnd1 point
-
Something like this. while 1 If Test_Assert($thepopup) Then ExitLoop Wend Func Test_Assert($popup) Local $return = 0 If (WinExists("[TITLE:" & $popup & "]")) Then WinActivate("[TITLE:" & $popup & "]") Send("{CTRLDOWN}c{CTRLUP}") Local $olo = ClipGet() ACRAOutputerror($olo) Send("{ENTER}") $return = 1 EndIf Return $return EndFunc1 point
-
1 point
-
You must have some incredibly shitty software running on your computer if you're getting some of those exception messages. I'd run a virus scan on your hard drive before I worried about trying to get past these messages.1 point
-
Getting error while using global varible outside of function.
nazirequbal786 reacted to guinness for a topic
Show your code next time and then water and I don't waste our time guessing.1 point -
1 point
-
Longer answer: yes, try what regexp engines call alternation. The pattern "abc|def" matches "abc" or "def" and that's only the scratch of the surface.1 point
-
What is the Au3Info output? Probably the application doesn't use the Windows API for GUI creation. This isn't AutoIt's fault.1 point
-
...what of course made me curious ... and led to this: You are strongly discouraged to use WinHTTP in asynchronous mode with AutoIt.1 point
-
Account for system interruption?
olo reacted to kaotkbliss for a topic
Here's the ver simple script I have running along side my main for automatic updates While 1 If WinExists("Automatic Updates") Then ControlClick("Automatic Updates","","[CLASS:Button;INSTANCE:2]") EndIf Sleep(10) Wend and the one for Outlook AutoItSetOption("WinTitleMatchMode",2) While 1 If WinExists("Office") Then $text = WinGetText("Office") $str = StringInStr($text,"Your IMAP server has closed the connection.") If $str <> 0 Then WinActivate("Office") ControlClick("Outlook","","[CLASS:Button;INSTANCE:1]") ControlSend("Inbox - Microsoft Outlook","","[CLASS:MsoCommandBar; INSTANCE:1]","{F9}") Else ; EndIf EndIf Wend 1 point -
JerryWu, Welcome to the AutoIt forum. But in future please do not resurrect 5 year old posts - just start a new one like this. M231 point
-
Well, the schema is the following : 1. Run the setup 2. Wait for it to finish 3. Close it ;1 Run(... ;setup path ;2 WinWait("Setup - Finished") ;your setup title (if this last changes its title when finished) ;3 ControlClick(... ;close button ;or ProcessClose(... ;setup pid Br, FireFox.1 point
-
Apparently Aipion got all butthurt over me saying his code was shit. Even though it is shit. Why is it shit? Because it uses Send(). Simple user interaction with the keyboard will break the script. There are much better ways of providing input to the elements on a page that the user cannot interrupt. It's ironic, really. I had just finished reading when I was directed towards the report directed at me. Kind of rings pretty damn true. For those curious, here's the report description: Let's pick this apart, shall we? When did I say "fuck you" or advocate saying that? When did I mention anything about garbage? I didn't. I said the code was shit. This is not opinion. This is not subjective. It can be very clearly demonstrated scientifically that the code is bad because it is easy to break the script's flow of execution. There are very simple alternatives that are an order of magnitude more reliable. Then, of course, there's the years of empirical data I have that proving that Send() is unreliable on a good day due to unforeseen events. But what do I know. You know what I don't find to be very nice? People who fail to read the rules. You did not read the rules and helped somebody do something that violates our rules. Then you got some sand in your vag and abused the report feature to report me. Me. A moderator. You reported a moderator. What are the others going to do? Ban me for telling you and the OP to read the rules because you broke them? Choo choo. Hear that? It's the logic train. You missed it. This would be incorrect. I can get away with what I want because of substantial contributions to this language and this community. My eccentricities are tolerated because in general I'm valuable to have around. You? What purpose do you serve? Well right now you are serving as fodder for me to shred which others will find entertaining. So you have that going for you I guess. /golfclap Anyway. You get a 7 day ban for your little report. My suggestion to you is accept the 7 day ban, don't PM me - or other mods - to bitch about it and don't try to evade it. Basically anything but being quiet will lead to your permanent removal from this forum. No, you won't evade the removal.1 point