MePHiTiC
Active Members-
Posts
59 -
Joined
-
Last visited
About MePHiTiC
- Birthday 02/24/1979
Profile Information
-
Location
Sin City
MePHiTiC's Achievements
Wayfarer (2/7)
0
Reputation
-
Anyone have a sample script that they know works as a script? I'll give that a try and see where I come out. Not sure why this isn't working as planned
-
I seen reference to this as well. I checked the interactive check box on the service which also didn't appear to do anything. From everything I've done the best I can tell is any of my scripts set as a service do not work. I can't tell however if it's because of the script or the way the service is being added (which I've tried a bunch today).
-
Yeah made sure I was seeing all tasks. I'll double check again tomorrow to be sure however.
-
I don't believe Windows Server 2003 Standard has UAC, or does it? I'm not getting prompts when I run it just by double clicking on it. I have tried running this as admin as a service, no go. Double clicking it as admin works as I expect.
-
Nothing is running in TaskManager (the script or in this case notepad.exe) and the service appears to be running without errors (logged to EventViewer). As for the code, right now I'm just trying to get the above code to run as a service. Every 5 seconds a new Notepad instance should be opened (or atleast I believe that's what should happen). I drilled down to this basic script just to see if the script I had as a service was doing anything, even with this nothing is happening.
-
I'm trying to add a service to Windows Server 2003 Standard which basically runs another script every couple of mins. I've read through the various articles here and in the FAQ wiki on how to add a service to windows. I've tried the UDF's, the RunAsSvc application, the sc.exe application, and the srvany.exe application. While all of these add a service which I can get to start/stop, the script does nothing. Double clicking the service exe does what I expect. Below is the code I've basically stripped it down to opening notepad from a loop, this does nothing as a service, but does when double clicked. What am I missing? #Region #AutoIt3Wrapper_UseUpx=n #EndRegion While 1 ShellExecute("notepad.exe") Sleep(5000) WEnd
-
MsgBox to popup once when window is active
MePHiTiC replied to MePHiTiC's topic in AutoIt General Help and Support
bogQ Thanks seems to have did the trick. Appreciate the quick response!!! -
I'd like to popup a msgbox with static information in the box when a window becomes actives, however I only want to do this once. Not every time a window is active during a session. If the window closes and then re-opens I'd like the msgbox to re-appear again, yet only once for the session. Below is what I have so far, however it pops up every time the window (in this case Notepad) is active. While 1 WinWaitActive("Untitled - Notepad","") MsgBox(262144,"Title","Text") ;262144 Sets MsgBox ontop of all windows WEnd
-
WinActivate won't activate a window
MePHiTiC replied to MePHiTiC's topic in AutoIt General Help and Support
This is what I have that will not activate the window that popups behind the main window: Opt("WinTitleMatchMode", 2) ShellExecute("TableTouch Setup.msi") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Welcome to the Table Manager Setup Wizard") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Please select applications to be installed.") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","The installer will install Table Manager to the following folder.") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Confirm Installation") Send("!n") ;This is the window that will not activate! If Not WinActive('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '') Then WinActivate('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '') WinWaitActive('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '') ControlClick('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '',1312620) Send($SERVER & "{TAB}" & $DB & "{TAB}" & $USER & "{TAB}" & $PASSWORD & "{TAB}{TAB}{TAB}{ENTER}") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Table Manager has been successfully installed.") ControlClick("Table Manager","",5567) -
WinActivate won't activate a window
MePHiTiC replied to MePHiTiC's topic in AutoIt General Help and Support
Here is my code: $SERVER = "192.168.1.1" $DB = "database" $USER = "username" $PASSWORD = "password" Opt("WinTitleMatchMode", 2) ShellExecute("TableTouch Setup.msi") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Welcome to the Table Manager Setup Wizard") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Please select applications to be installed.") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","The installer will install Table Manager to the following folder.") Send("!n") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Confirm Installation") Send("!n") ;This is the window that will not activate! If Not WinActive("Table Manager Configuration","") Then WinActivate("Table Manager Configuration","") $handle = WinGetHandle("Table Manager Configuration") WinWaitActive($handle) ControlClick("Table Manager Configuration","",1312620) Send($SERVER & "{TAB}" & $DB & "{TAB}" & $USER & "{TAB}" & $PASSWORD & "{TAB}{TAB}{TAB}{ENTER}") If Not WinActive("Table Manager","") Then WinActivate("Table Manager","") WinWaitActive("Table Manager","Table Manager has been successfully installed.") ControlClick("Table Manager","",5567) -
I have an installer that goes well until a configuration screen pops up behind the main install window. No matter what I try, I can't get the config screen to activate. Below is the Window info from AutoIt. Any ideas? >>>> Window <<<< Title: Table Manager Configuration Class: WindowsForms10.window.8.app.0.33c0d9d Position: 468, 207 Size: 504, 426 Style: 0x16CB0000 ExStyle: 0x00050180 Handle: 0x00330504 >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x00190518 >>>> Mouse <<<< Position: 930, 220 Cursor ID: 2 Color: 0xD1D3DD >>>> StatusBar <<<< >>>> Visible Text <<<< Connection Status: Test Connection OK Please provide configuration information Trusted Connection User ID: Database: Password: Server: >>>> Hidden Text <<<< I've tried window title and handle without luck. Can anyone help? MePH
-
Not sure how to return to While statement
MePHiTiC replied to MePHiTiC's topic in AutoIt General Help and Support
Ahhh Can't believe I missed that! Thanks for the help! MePH -
Not sure how to return to While statement
MePHiTiC posted a topic in AutoIt General Help and Support
I've got this below snippet of a script which saves data from a swiped card to a csv file. Today I wanted to add a check to see if the card has already been swiped. It's working for the most part except when a duplicate swipe is seen, I get the msgbox saying "Text was found in file at line #:", but then the script goes ahead and writes the swipe to the csv. I'd like for it to display the msgbox then just return to the while statement waiting for the next swipe, not writing any duplicate data. Any suggestions how I work this out? ;Waits for swipe data from card reader ;--------------------------------------- While 1 $String = _CommGetLine (@CR, 0, 0) If StringRegExp($String, '\%(.*?)\^\d{10}\^1\^.') Then $Pattern1 = '\d{10}';Returns ten digit card number $Pattern2 = '\%(.*?)\^';Returns first name $SwipeResults1 = StringRegExp($String, $Pattern1, 3) $SwipeResults2 = StringRegExp($String, $Pattern2, 3) ; ----- Start --- Added 09/02/08 as test for dup swipe ----- $FTIF = _FindTextInFile($OpenCardFile, $SwipeResults1[0]) If @error Then MsgBox(0, "Error!", "Error Code: " & @error) ElseIf Not $FTIF Then ;MsgBox(0, "No Match", "Text was not found in file") Else MsgBox(0, "Match", "Text was found in file at line #: " & $FTIF) EndIf ; ----- End --- Added 09/02/08 as test for dup swipe ----- FileOpen($OpenCardFile, 1) FileWriteLine($OpenCardFile, $SwipeResults1[0] & "," & $SwipeResults2[0] & "," & @MON & "/" & @MDAY & "/" & @YEAR & "," & @HOUR & ":" & @MIN & ":" & @SEC) Sleep(1000);1 Sec pause to finish writing file FileClose($OpenCardFile);Closes csv file in order to save swipes SplashTextOn("Company Name", $SwipeResults2[0] & "'s info saved!", 500, 100, -1, 425, 4, "Lucida Console", 20, 800) Sleep(1000);Display mesage for 1 seconds SplashOff() Else MsgBox(16, "An error has occurred!", "Please swipe your patron card again.", 10) FileWriteLine($OpenCardFile, "NULL," & "ERROR READING CARD," & @MON & "/" & @MDAY & "/" & @YEAR & "," & @HOUR & ":" & @MIN & ":" & @SEC) Sleep(1000);1 Sec pause to finish writing file FileClose($OpenCardFile) EndIf WEnd ;--------------------------------------- Thanks! MePH -
BG Color on an embeded swf file in IE
MePHiTiC replied to MePHiTiC's topic in AutoIt General Help and Support
ProgAndy, Thanks! ... That worked for the most part. There is still a thin black border around the swf that I can't figure out. Your fix did handle the white border however, thank you! MePH -
I've got an swf that I'm trying to play and have the below code. The only problem is there is a border around the flash. It's a white border that I can't figure out how to change the color of. I'd like it to be #831518 if at all possible. I've tried HTML code, gui color controls, nothing seems to get it ... Can anyone help me out please? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <ie.au3> HotKeySet("{ESC}", "Remove") $Form1 = GUICreate("Cimarron Casino", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_SYSMENU,$WS_POPUPWINDOW,$WS_BORDER)) $Obj = _IECreateEmbedded ( ) $browser = GUICtrlCreateObj($Obj, -1, -1, @DesktopWidth, @DesktopHeight) GUICtrlSetResizing(-1,$GUI_DOCKBORDERS) _IENavigate ($Obj, 'about:blank') $oDoc = _IEDocGetObj ($Obj) $oDoc.body.style.overflow = "auto" GUISetState(@SW_SHOW) $flash1 = ("C:\WINDOWS\Help\Tours\mmTour\segment1.swf") $sHTML = '<embed id=flashy src="'&$flash1&'" ' $sHTML &= 'quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ' $sHTML &= 'type="application/x-shockwave-flash" ' $sHTML &= 'width="100%" height="100%"></embed>' _IEBodyWriteHTML ($Obj, $sHTML) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Remove () GUIDelete() Exit 0 EndFunc Thanks, MePH