-
Posts
144 -
Joined
-
Last visited
About MuffinMan
- Birthday July 31
Profile Information
-
Location
Dalton, GA USA
Recent Profile Visitors
366 profile views
MuffinMan's Achievements

Adventurer (3/7)
12
Reputation
-
MuffinMan reacted to a post in a topic: Any other method besides Shell.Windows for creating _IEAttach browser object?
-
It sounds like you sufficiently answered the mods question regarding game automation... The Msgbox command stops the script from running, so the subsequent lines of code won't run until after you've closed the box. I think you are very close, try another program you start outside the script to test it, maybe the file save dialog in Word, Excel, etc? You'll probably want to investigate a loop like While... Wend to keep your script running.
-
argumentum reacted to a post in a topic: (+n) + (-n) + (-n) = baloney ???? [SOLVED]
-
kylomas reacted to a post in a topic: (+n) + (-n) + (-n) = baloney ???? [SOLVED]
-
czardas reacted to a post in a topic: (+n) + (-n) + (-n) = baloney ???? [SOLVED]
-
(+n) + (-n) + (-n) = baloney ???? [SOLVED]
MuffinMan replied to argumentum's topic in AutoIt General Help and Support
"Pence Conversion" is a VERY different thing in the US! -
Get Power On Hours Hard Disk
MuffinMan replied to ozzy1615's topic in AutoIt General Help and Support
Take a look at ptrex's SMART drive Analysis SMART_WMI.au3 example. You should be able to get POH data using it. -
Help Using WinActive with a Changing window title
MuffinMan replied to driverj's topic in AutoIt General Help and Support
Have you tried setting WinTitleMatchMode? And maybe try using a single "=" here: If $activeWindowTitle == $CR Then -
"Set my PC date and time " Help me please .
MuffinMan replied to SundayXsniger's topic in AutoIt General Help and Support
This link may help -
Title text match with spaces
MuffinMan replied to MuffinMan's topic in AutoIt General Help and Support
Well, I have something now that certainly seems to work, I'll start testing and see how this holds up; still interested if anyone has any better solutions. Opt("WinTitleMatchMode", -1) Run("Notepad") WinWait("[CLASS:Notepad]", "", 10) Send ("Smith" & @CRLF & "Jones" & @CRLF & "Nom De Plume" & @CRLF) $WinText = StringStripWS(WinGetText("[CLASS:Notepad]"),8) If StringInStr($WinText, "jones") <> 0 Then MsgBox(0,"FOUND","Found jones") EndIf If StringInStr($WinText, "nomdeplume") <> 0 Then MsgBox(0,"FOUND","Found Nom De Plume") EndIf -
I am trying to rebuild an old single signon script that has been giving us a bit of trouble lately. I didn't write it and it was written in another script language. If the target program is already open it will have the current user's last name as part of the window text, which I am trying to compare against the user name to see if I should just WinActivate or Process Close and start the program over. I will be provided the username like "jones", or "smith" and the title check works fine for last names (with no spaces), but if the last name DOES contains spaces, say "Nom De Plume", then all I will be given as a username is "nomdeplume". Is there any way (via a regex maybe) that I can still check the text on the screen and somehow ? I have been reading about the Advanced (4) mode of WinTitleMatchMode, but it is over my head. Any help is appreciated. Here is a small reproducer script: Opt("WinTitleMatchMode", -1) Run("Notepad") WinWait("[CLASS:Notepad]", "", 10) Send ("Smith" & @CRLF & "Jones" & @CRLF & "Nom De Plume" & @CRLF) If WinExists("[CLASS:Notepad]", "jones") Then MsgBox(0,"FOUND","Found Jones") EndIf If WinExists("[CLASS:Notepad]", "nomdeplume") Then MsgBox(0,"FOUND","Found Nom De Plume") EndIf
-
I have been trying to learn more about RegEx recently, so I'm no expert, but I think this will work. Do Local $sValue = InputBox("Testing", "Enter the MAC Address.", "", " M17") Until StringRegExp($sValue, '([0-9a-fA-F]{2}[-]){5}([0-9a-fA-F]{2})') = 1
- 12 replies
-
So did 232Showtime's code not work for you? I looked at the last code you posted and it has lots of syntax errors; maybe you stripped out all of the double-quotes somehow?
-
coffeeturtle reacted to a post in a topic: Open browser but no visibly
-
True fact: You are not making many friends here. And you have already been given the answer. Check this page for some examples that may help you on your journey.
-
This code will allow the parent function to run multiple times, but the child function will only run once $flag = 0 $result = 0 parentfunc() ; Running the function 3 times to test parentfunc() parentfunc() Func parentfunc() MsgBox(0,"Parent Func", "Parent Fumction is Running") ; Just for testing ;some codes... Do ;some codes... thisfunc() If $flag = 1 Then ExitLoop ;some codes... MsgBox(0,"Debug", "You should never see this text") Until $result = 1 EndFunc Func thisfunc() Local $x,$var Local $color = "0xE62121" If $flag <> 1 Then MsgBox(0,"Child Function", "Child Function Will Only Run Once") ; Just for testing For $x=0 to 4 Switch $x Case 0 $var = PixelSearch(67, 614, 77, 617,$color,10) Case 1 $var = PixelSearch(165, 614, 175, 617,$color,10) Case 2 $var = PixelSearch(265, 614, 275, 617,$color,10) Case 3 $var = PixelSearch(365, 614, 375, 617,$color,10) Case 4 $var = PixelSearch(465, 614, 475, 617,$color,10) EndSwitch Switch @error Case True ;some codes... EndSwitch Next EndIf $flag= 1 EndFunc
-
Like this? $FuncRun = 0 Example() Example() Example() Func Example() If $FuncRun = 0 Then ; Run your Actual Function code here MsgBox(0,"1AndDone", "I'm Done") EndIf $FuncRun = 1 EndFunc
-
Easiest way for users to find their machine name
MuffinMan replied to legend's topic in AutoIt General Help and Support
We ran into this issue at work too, and since all but a handful of our PCs are on the same network, we added the server variable REMOTE_HOST to the bottom of our Intranet page. So when someone calls we just tell them to open the Intranet (it has been set as their default home page) and scroll to the bottom. That has worked well for us. -
Yeah, the MsgBox was in the original code and I left it in just for testing / debugging purposes. If the OP truly wants a popup, then the Msgbox needs to have a timeout on it. I edited my earlier post to include a 5 second timeout on the MsgBox. Thanks for keeping me straight, Bill! ;-)
-
This seems to work well - if there is no keyboard or mouse input, it kills the window if it exists. #include <WinAPISys.au3> $title = "PayDay" ; "PayDay is the title of the site" $minutes = 15 While 1 ;if the timer is more than X minutes then: If _WinAPI_GetIdleTime() >= $minutes * 60 * 1000 AND WinExists($title) Then MsgBox (0, "Time reached", "You have been idle for more than " & $minutes & " minutes.", 5) WinClose($title) ; Exit EndIf ;Sleep for 5 seconds before looping again: Sleep(5000) WEnd