happy2help
Active Members-
Posts
84 -
Joined
-
Last visited
About happy2help
- Birthday 05/10/1970
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
happy2help's Achievements
Wayfarer (2/7)
0
Reputation
-
Play videos in full screen mode with VLC
happy2help replied to cramaboule's topic in AutoIt Example Scripts
Very nice - works well in Win7. It would be nice to be able to choose file or folder (maybe toggle switch) and then play all files in that folder. -
do you know if it will work in the UK as we don't have a zipcode in the same format? btw Merry Xmas all
-
Error: Subscript used with non-Array variable
happy2help replied to Jekkyl's topic in AutoIt General Help and Support
I frequently get this error when I run my scripts by double clicking them. This is due to me moving my "includes" folder. If I run them from Scite, they run fine. As an experiment to find if this is the case, copy all your "includes" into your script folder and try to run it. If it runs OK then your configuration is messed up. -
Hi All, This script works well, but seems to be working too hard when there is nothing to process. I run it on several laptops/PCs and the lowest spec machine is a 1.5ghz 1gb ram and Win 7. The processor seems to be working way too hard as none of the watched processes are even running. My question is ... How do I lower the processor requirements, but keep functionality of this script? I think it might be because i'm using processexist as the checker. #NoTrayIcon #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=C:\WindowCheck.exe #AutoIt3Wrapper_Run_Tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("WinSearchChildren", 1) ;0=no, 1=search children also While 1 If ProcessExists("excel.exe") Then _excel() If ProcessExists("allinone.exe") Then _allinone() If ProcessExists("outlook.exe") Then _outlook() If ProcessExists("ConvertXtoDvd.exe") Then _ConvertXtoDvd() Sleep(1000) WEnd Func _excel() If WinExists("Microsoft Office Excel - Compatibility Checker") Then ;**** Microsoft Office Excel - Compatibility Checker Sleep(1500) WinActivate("Microsoft Office Excel - Compatibility Checker", "") Send("+{TAB 2}{SPACE}") Sleep(500) Send("{TAB 2}{SPACE}") EndIf If WinExists("Microsoft Office Excel", "A formula or sheet you") Then ;**** Excel VAT formula Sleep(1500) WinActivate("Microsoft Office Excel", "A formula or sheet you") ControlSend("Microsoft Office Excel", "A formula or sheet you", "[CLASS:Button; INSTANCE:1]", "{SPACE}") EndIf If WinExists("Microsoft Office Excel", "Do you want Excel to recalculate") Then ;**** Excel to recalculate Sleep(1500) WinActivate("Microsoft Office Excel", "Do you want Excel to recalculate") Send("n") Sleep(500) EndIf If WinExists("Microsoft Office Excel", "Data may exist in the sheet") Then ;**** Excel delete sheet Sleep(1500) WinActivate("Microsoft Office Excel", "Data may exist in the sheet") ControlSend("Microsoft Office Excel", "Data may exist in the sheet", "[CLASS:Button; INSTANCE:1]", "{SPACE}") EndIf If WinExists("Microsoft Office Excel", "with references to unsaved documents") Then ;**** Excel delete sheet Sleep(1500) WinActivate("Microsoft Office Excel", "with references to unsaved documents") ControlSend("Microsoft Office Excel", "with references to unsaved documents", "[CLASS:Button; INSTANCE:1]", "{SPACE}") EndIf EndFunc ;==>_excel Func _allinone() If WinExists("Burn Data CD/DVD 5.2", "Enable BURN-Protection") Then WinSetTitle("Burn Data CD/DVD 5.2", "Enable BURN-Protection", "My New Burn Data CD/DVD 5") If WinExists("Burn Data CD/DVD 5.2", "The total file size has exceeded 4380 MB") Then ;**** Pepsky Data Burning next disk Sleep(1500) WinActivate("Burn Data CD/DVD 5.2", "The total file size has exceeded 4380 MB") Send("{ENTER}") Sleep(1500) WinWait("Select the files or folder to be burned") Send("{TAB 3}{ENTER}") EndIf If WinExists("Burn Data CD/DVD 5.2", "Do you want to burn?") Then ;**** Pepsky Data Burning start burn Sleep(1500) WinActivate("Burn Data CD/DVD 5.2", "Do you want to burn?") Send("y") Sleep(500) EndIf If WinExists("Burn Data CD/DVD 5.2", "Delete all of the added files and folders") Then ;**** Pepsky Data Burning Delete all of the added files and folders? Sleep(1500) WinActivate("Burn Data CD/DVD 5.2", "Delete all of the added files and folders") ControlSend("Burn Data CD/DVD 5.2", "Delete all of the added files and folders", "[CLASS:Button; INSTANCE:1]", "{SPACE}") EndIf If WinExists("Burn Data CD/DVD 5.2", "Burning completed successfully") Then ;**** Pepsky Data Burning complete Sleep(1500) WinActivate("Burn Data CD/DVD 5.2", "Burning completed successfully") ControlSend("Burn Data CD/DVD 5.2", "Burning completed successfully", "[CLASS:Button; INSTANCE:1]", "{SPACE}") FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") EndIf If WinExists("Information", "Burning image completed") Then ;**** Pepsky Image Burning complete Sleep(1500) WinActivate("Information", "Burning image completed") ControlSend("Information", "Burning image completed", "[CLASS:Button; INSTANCE:1]", "{SPACE}") FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") EndIf If WinExists("Information", "Burn process completed successfully") Then ;**** Pepsky DVD Folder Burning complete Sleep(1500) WinActivate("Information", "Burn process completed successfully") ControlSend("Information", "Burn process completed successfully", "[CLASS:Button; INSTANCE:1]", "{SPACE}") FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") EndIf If WinExists("Burn Data CD/DVD 5.2", "Burning completed, verifying failed.") Then ;**** Burning completed, verifying failed. Sleep(1500) WinActivate("Burn Data CD/DVD 5.2", "Burning completed, verifying failed.") ControlSend("Burn Data CD/DVD 5.2", "Burning completed, verifying failed.", "", "!") FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") EndIf EndFunc ;==>_allinone Func _outlook() WinWait("Microsoft Office Outlook", "A program is trying to send an e-mail message on your behalf", 20) For $iNum = 1 To 5 If WinExists("Microsoft Office Outlook", "A program is trying to send an e-mail message on your behalf") Then While 1 WinActivate("Microsoft Office Outlook") Sleep(500) If ControlCommand("Microsoft Office Outlook", "A program is trying to send an e-mail message on your behalf", "Button4", "IsEnabled") Then Sleep(500) ControlFocus("Microsoft Office Outlook", "A program is trying to send an e-mail message on your behalf", "[CLASS:Button; INSTANCE:4]") Send("{SPACE}") ExitLoop 2 EndIf Sleep(250) WEnd EndIf Sleep(1000) Next EndFunc ;==>_outlook Func _ConvertXtoDvd() If WinExists("ConvertXtoDVD", "Operation complete") Then ;**** ConvertXtoDVD Operation Complete Sleep(1500) WinActivate("ConvertXtoDVD", "Operation complete") ControlSend("ConvertXtoDVD", "Operation complete", "[CLASS:Button; INSTANCE:1]", "{SPACE}") FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") EndIf EndFunc ;==>_ConvertXtoDvd
-
Thanks! Cracked it. If you don't use IE, then before running this script, run IE, go to Youtube and set the volume to max, then close Youtube and IE. It should remember your setting till you change them manually again. Hope this helps anyone else. p.s. Is it possible to set the hotkey and right arrow as variables at the top of the script as a few friends that use your script cant use ESCAPE or RIGHT ARROW so I had to scan through your script and change it manually. p.p.s. The slide function, slides BEHIND the last window that was on top. Is it possible to have the slide window On Top, but the anchor window as it is now?
-
Hi All I'm coming back to an old script that I used to use to unpack several RAR files, one at a time. I used to use this script below $windo = 'Laptop' Dim $aArray[4] While WinExists( $windo ) $count = 0 $aArray[0] = '0' $aArray[1] = '0' $aArray[2] = '0' $aArray[3] = '0' MsgBox(0, "Ready?","",5) MsgBox(0, "Details", "Title=" & $aArray[0] & @LF & "Handle=" & $aArray[1] & @LF & "Count=" & $aArray[2],5) $var = WinList($windo) For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1] & @LF & "Count=" & $count,5) $aArray[$count] = $var[$i][1] ; MsgBox(0, "Details", "Title=" & $aArray[$count] ) $count = $count + 1 if $count > 3 then $count = 0 EndIf EndIf dosomething() Next WEnd Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc Func dosomething() WinSetTitle($windo,'','Unpacking') if $aArray[1] = '0' Then ;EndIf Else MsgBox(0, "Ready?","" & $aArray[0] ,5) WinActivate($aArray[0]) WinWaitActive($aArray[0]) WinWaitClose($aArray[0]) EndIf EndFunc ;WinWait('Extracting') ;AdlibEnable("check", 2000) ;While (1) ;AdlibEnable("check", 2000) ; Sleep(0100) ; myFunction() ;mySecondFunction() ;WEnd ;Func myFunction() ; if not WinExists('Unpacking') Then ; if not WinExists('Extracting') Then ; If WinActive('Paused') Then ; Send('c') ; EndIf ;EndIf ;EndIf ; Sleep(5000) ; WinWaitClose('Unpacking') ;EndFunc ;==>myFunction ;Func mySecondFunction() ; If WinExists('Testing') Then ; Sleep(5000); EMPTY (What are you wanting to do here?) ; EndIf ; If Not WinExists('Paused') Then ; Sleep(6200) ; EndIf ; WinActivate('Paused') ;EndFunc ;==>mySecondFunction ;Func check() ; if WinExists('Extracting') Then ; WinSetTitle('Extracting','','Unpacking') ; EndIf ; Sleep(500) ; if WinExists('Extracting') Then ; if WinExists('Unpacking') Then ; MsgBox(64, "Info", "The message") ; WinActivate('Extracting') ; Send('p') ; EndIf ; EndIf ;EndFunc but I want to update it. I have used a script which uses a UnRar.udf, but I don't want to go down that route again. I want to automate this process (3. onwards) 1. select a rar file to unpack 2. rightclick/ unpack.( do this multiple times) 3. when "Unpacking...." window comes up, hit pause 4. then cycle though paused window, unpausing 1 at a time(waiting for it to finish before moving on to the next) It needs to keep checking if there is any new WinRar window and add that to the list to process. I thought of using WinList to get the name and PID, but then wasn't sure how to control the first window. I could use something like $var = WinList("[REGEXPCLASS:(Explore|Cabinet)]") for WinRar, but I don't know how to find out what REGEXPCLASS to use. Autoit Window Info doesn't seem to tell me. I am probably thinking this through too much and it can be done simply. Any help would be great.
-
Am I doing something wrong? About 80% of the songs play at such a low volume that I can't hear them. Is there a volume control in IE that I don't know about? I normally only use Firefox, so IE is not setup for daily use.
-
First AutoIt - Bluetooth Stream
happy2help replied to JQadrad's topic in AutoIt General Help and Support
My idea would be to send a file from the phone called "left.txt" when you move left and then the PC scans a folder for either "left.txt","right.txt",etc and when it finds one it executes it. That way the phone sends a stream of left, right, up, downs to the PC and the PC reads the name of the file and deletes it immediately ready for the next to be sent. I use a similar setup at home, it scans a folder for a list of files and then reacts to a file appearing and then deletes the file, waiting for the next to appear. -
Just a little cosmetic thing - it would be nice to have the tooltip display the song title and artist separately, even just with a " - " between would make it easier to read.
-
Script as Scheduled Task dies partway though
happy2help replied to ijourneaux's topic in AutoIt General Help and Support
Sounds like an issue with the fact it is locked. I have similar problem with my TAS backup script. Put this at the start of the script to replicate the machine at 6.30 Run(@SystemDir & "\rundll32.exe user32.dll,LockWorkStation") I use a commandline program called logon.exe to unlock the PC before the script runs and then relock it with the above scriptlet. -
Strange - What OS have you tested this on? My Win7 didn't display the upper tooltip - hence my suggestion - but when I tried it on my XP machine it works fine?
-
Very nice and useful Might be nice if it had a tooltip saying "please wait, just retrieving song....." as I thought it wasn't working on my slow connection.
-
Compiled script read a au3 file
happy2help replied to happy2help's topic in AutoIt General Help and Support
I have got it working with this, but I need some help cleaning it up and adding error checking Func Check() $Active = WinGetTitle("[Active]") ; get current title of window TrayTip($Active, "", 10, 2) $var = IniReadSectionNames($inifile) ; find out how many sections are in inifile ; _ArrayDisplay($var, "test") For $i = 1 To $var[0] - 1 $Info = IniReadSection($inifile, $i) ; read inifile at section $i ; _ArrayDisplay($Info, "test") If $Info[1][1] <> $Active Then ContinueLoop ; check if "title" is same as $Active TrayTip($Info[1][1], $Info[2][1], 10, 2) ; tell me what its found ControlSend($Info[1][1], $Info[2][1], "", $Info[3][1]) ; send title, text and send If $Info[4][1] <> "none" Then Sleep($Info[4][1]) If $Info[5][1] <> "none" Then Send($Info[5][1]) If $Info[6][1] <> "none" Then WinWait($Info[6][1], "", 5) If $Info[7][1] <> "none" Then Send($Info[7][1]) If $Info[8][1] <> "none" Then FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") WinWaitClose($Active, $Info[1][1], 30) Next EndFunc ;==>Check and windows.ini now looks like this ;**** Excel VAT formula [1] Title=Microsoft Office Excel Text=A formula or sheet you Send={SPACE} Sleep=none Send=none WWait=none Send=none FCopy=none [2] Title=Microsoft Office Excel - Compatibility Checker Text= Send=+{TAB 2}{SPACE} Sleep=500 Send={TAB 2}{SPACE} WWait=none Send=none FCopy=none ;**** Excel to recalculate [3] Title=Microsoft Office Excel Text=Do you want Excel to recalculate Send=n Sleep=500 Send=none WWait=none Send=none FCopy=none ;**** Excel delete sheet [4] Title=Microsoft Office Excel Text=Data may exist in the sheet Send={ENTER} Sleep=500 Send=none WWait=none Send=none FCopy=none ;**** Pepsky Data Burning next disk [5] Title=Burn Data CD/DVD 5.2 Text=&Yes Send={TAB 3}{ENTER} Sleep=none Send=none WWait=Select the files or folder to be burned Send={TAB 3}{ENTER} FCopy=none ;**** Pepsky Data Burning start burn [6] Title=Burn Data CD/DVD 5.2 Text=Do you want to burn? Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=none ;**** Pepsky Data Burning Delete all of the added files and folders? [7] Title=Burn Data CD/DVD 5.2 Text=Delete all of the added files and folders? Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=yes ;**** Pepsky Data Burning complete [8] Title=Burn Data CD/DVD 5.2 Text=Burning completed successfully Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=yes ;**** Pepsky Image Burning complete [9] Title=Information Text=Burning image completed Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=yes ;**** Pepsky DVD Folder Burning complete [10] Title=Information Text=Burn process completed successfully Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=yes ;**** ConvertXtoDVD Operation Complete [11] Title=ConvertXtoDVD Text=Operation complete Send=[CLASS:Button; INSTANCE:1] Sleep=none Send=none WWait=none Send=none FCopy=yes ;ssdffr [12] Title=Untitled - Notepad Text=Operation complete Send=!fp Sleep=none Send=none WWait=none Send=none FCopy=yes -
Compiled script read a au3 file
happy2help replied to happy2help's topic in AutoIt General Help and Support
Hi, I'm stuck again I'm using this function Func Check() $Active = WinGetTitle("[Active]") TrayTip($Active, "", 10, 2) $Info = IniReadSection("C:\Tony\Windows.ini", $Active) If @error Then Return Else TrayTip($Active, $Info[1][1], 10, 2) ControlSend($Active, $Info[1][1], "", $Info[2][1]) If $Info[3][1] <> "none" Then Sleep($Info[3][1]) If $Info[4][1] <> "none" Then Send($Info[4][1]) If $Info[5][1] <> "none" Then WinWait($Info[5][1], "", 5) If $Info[6][1] <> "none" Then Send($Info[6][1]) If $Info[7][1] <> "none" Then FileCopy("B:\Scripts\To Use\Completed.au3", "B:\Scripts\AcerLaptop\") WinWaitClose($Active, $Info[1][1], 30) EndIf EndFunc ;==>Check and have found a problem. I have a program that uses the same title, just different text. I have found that this only tries the first version of the title. [Untitled - Notepad] Text=Operation complete Send=!fp Sleep=none Send=none WWait=none Send=none FCopy=yes [Untitled - Notepad] Text=blah blah Send=!fp Sleep=none Send=none WWait=none Send=none FCopy=yes With the above option, only the first would work (blah blah would never be found)