
BenfnJovi
Members-
Posts
17 -
Joined
-
Last visited
Everything posted by BenfnJovi
-
A watchdog app would not work as tcplisten() fails to bind every time, even on a reboot, until I recompiled. It also doesn't make sense to change the port since a simple recompile allowed the script to begin binding with the same IP and port again. The port is hardcoded on my compiled script, as well as the c++ app on the main machine. It is not something we want to reconfigure often, as we need all machines to use the same version in the field. I'm 99% sure this isn't actually a code problem, but an OS problem, because like I said, it worked fine for over 30 days on these two machines and is still working fine on the other 47 machines, and simply recompiling the code with no change allows it to start functioning again.
-
I have a tcp server script that has been compiled and running fine on 49 Win 10 machines for around 30 days. These machines will be going into a production environment soon, and I'd like to get to the root cause of this issue before deployment. A little background on what I'm doing so as to not confuse anyone with the unique nature of how these are setup: The machines that are running the script are a secondary or daughter machine, if you will, to a more robust main machine in a cabinet, and they just listen for commands from the main machine to start browser apps on other monitors, depending on what the main machine requests. The main machines all have a secondary nic specifically to communicate with the daughter machines and all daughter machines have identical images, with identical ip configurations that the tcp server binds to. When I came back to work from the weekend, two of the secondary machines do not allow the tcplisten() command to bind to the IP and/or port. I'm not sure which is being rejected, because I didn't include returning the error code in the error message when I compiled. I just show a message that it cannot connect. I've went through everything I could think of to figure this out, to no avail. I finally added in _WinAPI_GetLastErrorMessage ( ) so that I could see specifically what was being returned by the OS, recompiled, and it started binding again as if there were no issues. Literally, the only thing I added was the necessary include and a variable to store the WinAPI returned information to print in the error message. Nothing else was changed. I went back to the previous compiled version, and the connection was again rejected. The 47 other machines are still functioning just fine. It's just these two that are not. This leads me to believe that, for some reason, something happened in the OS and it is now rejecting the binding based on the earlier executable's file signature and not the new version(they are named exactly the same), since that's all I can think of that's truly changed. While it's technically working right now, I do not want them to go out into the field and randomly have the issue again. Have any of you ever came across an issue like this?
-
@spudw2k Positive the IP's are valid. I have full control over the network. I installed the dhcp server service, and configured all things related to the LAN. At the time of my first post, I only had 64 clients receiving IP's above .100, so everything below .100 would've been valid... If it weren't, it wouldn't have assigned the intended IP to "Ehternet 2", wouldn't you think? Windows will warn if you are using a gateway entry already in use by another nic, even on an inactive nic, and a warning dialog, requiring user confirmation, appears. To answer your second question, I'm not using the network names, I'm using the windows name assigned to each card...ie: "Ethernet 2", "Ethernet 3".
-
@jguinch... I apologize about just getting back to you on this. I had to finish that deployment, by setting the statics manually and have been busy with other things since. I still have a need to get this working properly for future deployments. I ran your script, as you requested and get the same results. "Ethernet 2" was assigned with ".253" and "Ethernet 3" was unaffected... Any other suggestions?
-
@jguinch I am having an issue with this UDF. Not sure if it is a bug or what. I used the _GetNetworkAdapterInfos() to see which adapters are available and which adapter(s) are connected. The machines I am currently working with, has two ethernet nics, with identical Windows 10 images. Each machine shows "Ethernet 2" and "Ethernet 3" in the "Network adapters" section of the control panel. The _GetNetworkAdapterInfos() function performs correctly and retrieves the necessary information I need to determine which adapter I want to assign a static IP to. In the case of this deployment, I have 200 machines that I want to assign a static IP to, based on a numerical portion of the computer name. The issue I'm having is when I use the functions _EnableStatic and _SetGateways. No matter which nic I pass, it assigns the static to "Ethernet 2". I've tried using the info returned from _GetNetworkAdapterInfos() in [n][8], and I've tried passing "Ethernet 3" as a string, and it still assigns it to "Ethernet 2". #include <Network.au3> local $isConnected, $availableNics, $ClientID $ClientID= StringTrimLeft(@ComputerName, 3) if $ClientID<100 then $ClientID= StringTrimLeft(@ComputerName, 4) if $ClientID<10 then $ClientID= StringTrimLeft(@ComputerName, 5) $availableNics= _GetNetworkAdapterInfos() $t=UBound($availableNics, 1) $n=0 Do If $availableNics[$n][9]=2 Then $isConnected=$availableNics[$n][8] ExitLoop Else ;I did this in case there was already a static, within the same subnet, assigned to a nic that wasnt connected so that ;it would not error when assigning a static to the connected nic, which appears not to work at all, even when ran seperately ;in a seperate script designed to set all nics as dynamic, ahead of running the static assignement script. _EnableDHCP($availableNics[$n][8]) _EnableDHCP_DNS($availableNics[$n][8]) EndIf $n=$n+1 Until $n=$t-1 ;This MsgBox displays the appropriate nic that should be affected MsgBox(0,"192.168.100." & $ClientID & " Adapter: " & $isConnected, "",10) _EnableStatic($isConnected, "192.168.100." & $ClientID, "255.255.255.0") _SetGateways($isConnected, "192.168.100.100") shutdown(2)
-
hmmm... I don't see any discrepancy in your script then. have you tried FileOpen()?
-
Its gonna be something simple. You are missing a character in the file name, or something along those lines. Go to an explorer window and navigate to the file. Click in the file path field and select the entire contents. Press Ctrl+C to copy the selection. Go back to your script and past that into your script. Make sure the filename itself is exact. I've had situations similar to this, where I missed a letter and didn't notice it.
-
auto it not working when using task scheduler
BenfnJovi replied to riya's topic in AutoIt General Help and Support
Also, I'm not sure what kind of application this is you are trying to automate, but your script will be much more reliable if you use keypresses rather then mouse clicks to select buttons. -
auto it not working when using task scheduler
BenfnJovi replied to riya's topic in AutoIt General Help and Support
Or the filename section... ex: ShellExecute("c:\MS.fur") -
auto it not working when using task scheduler
BenfnJovi replied to riya's topic in AutoIt General Help and Support
Proper usage of shellexecute(): ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] ) Input the location of "MS.fur", in the "workingdir" parameter. -
auto it not working when using task scheduler
BenfnJovi replied to riya's topic in AutoIt General Help and Support
Without an example of how your script calls *.fur and your scheduled task entry, it will be hard to help you. -
auto it not working when using task scheduler
BenfnJovi replied to riya's topic in AutoIt General Help and Support
Are you passing the correct working directory? -
Using a GUI to control a web based POS system
BenfnJovi replied to BenfnJovi's topic in AutoIt GUI Help and Support
I got it...Here is what I got to work..thanks anyway! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <WinAPI.au3> #include <IE.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $oIE, $GUIActiveX, $GUI_Button_MakeCard, $GUI_Button_AddCredits, $GUI_Button_Print, $GUI_Button_CashoutCard Local $GUI_Button_Logout, $GUI_Button_CloseShift, $msg, $GUI_Button_5, $GUI_Button_10, $GUI_Button_15, $GUI_Button_20, $GUI_Button_25, $GUI_Button_50, $GUI_Button_100 Local $font, $GUI_Button_OpenShift $oIE = ObjCreate("Shell.Explorer.2") GUICreate("J&M POS", 1024, 768, (@DesktopWidth - 1024) / 2, (@DesktopHeight - 768) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE,2,4,1024,420) $GUI_Button_Logout = GUICtrlCreateButton("Logout", 350, 490, 110, 50) $GUI_Button_CloseShift = GUICtrlCreateButton("Close Shift", 350, 540, 110, 50) $GUI_Button_OpenShift = GUICtrlCreateButton("OpenShift", 350, 440, 110, 50) $font = "Times New Roman" GUISetFont(14, 600, 0, $font) $GUI_Button_MakeCard = GUICtrlCreateButton("Create Card", 20, 440, 140, 75) $GUI_Button_AddCredits = GUICtrlCreateButton("Add Credits", 170, 440, 140, 75) $GUI_Button_CashoutCard = GUICtrlCreateButton("Cashout Card", 20, 550, 140, 75) $font = "Times New Roman" GUISetFont(16, 600, 0, $font) $GUI_Button_5 = GUICtrlCreateButton("$5", 680, 440, 100, 75) $GUI_Button_10 = GUICtrlCreateButton("$10", 790, 440, 100, 75) $GUI_Button_15 = GUICtrlCreateButton("$15", 900, 440, 100, 75) $GUI_Button_20 = GUICtrlCreateButton("$20", 680, 525, 100, 75) $GUI_Button_25 = GUICtrlCreateButton("$25", 790, 525, 100, 75) $GUI_Button_50 = GUICtrlCreateButton("$50", 900, 525, 100, 75) $GUI_Button_100 = GUICtrlCreateButton("$100", 790, 610, 100, 75) $GUI_Button_Print = GUICtrlCreateButton("Print", 900, 610, 100, 75) GUISetState() $oIE.navigate("/aladmin/mainLogon.jsp") ;_WinAPI_SetFocus($oIE) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Logout $oIE.navigate("/aladmin/common.do?mainmenu=Logoff") Case $msg = $GUI_Button_MakeCard $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Case $msg = $GUI_Button_CashoutCard $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=CashOutCard") Case $msg = $GUI_Button_AddCredits $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=AddCredits") Case $msg = $GUI_Button_OpenShift $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=OpenShift") Case $msg = $GUI_Button_CloseShift $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=CloseShift") Case $msg = $GUI_Button_5 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("5") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") ;send("^p") Case $msg = $GUI_Button_10 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("10") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_15 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("15") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_20 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("20") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_25 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("25") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_50 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("50") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_100 $oIE.navigate("/aladmin/common.do?mainmenu=POS&submenu=SellNew") _IELoadWait ($oIE) send("{ENTER}") _IELoadWait ($oIE) send ("+{TAB 7}") Send("100") send("{TAB 6}") send("{ENTER}") _IELoadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") Case $msg = $GUI_Button_Print _IELOadWait ($oIE) _IEAction ($oIE, "PrintDefault") $oIE.navigate("/aladmin/close_pos_window.do") EndSelect WEnd GUIDelete() EndFunc -
Using a GUI to control a web based POS system
BenfnJovi replied to BenfnJovi's topic in AutoIt GUI Help and Support
Here is my code... I started with the example in the Help feature. The webpage that I will be using must be kept confidential is the reason I used msn for this example. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $oIE, $GUIActiveX, $GUI_Button_MakeCard, $GUI_Button_AddCredits Local $GUI_Button_Home, $GUI_Button_Logout, $msg, $GUI_Button_5, $GUI_Button_10, $GUI_Button_20, $GUI_Button_50 $oIE = ObjCreate("Shell.Explorer.2") GUICreate("J&M POS", 800, 600, (@DesktopWidth - 800) / 2, (@DesktopHeight - 600) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE,2,4,800,400) $GUI_Button_MakeCard = GUICtrlCreateButton("Create Card", 20, 420, 100, 50) $GUI_Button_AddCredits = GUICtrlCreateButton("Add Credits", 120, 420, 100, 50) $GUI_Button_Home = GUICtrlCreateButton("Home", 220, 420, 100, 50) $GUI_Button_Logout = GUICtrlCreateButton("Logout", 320, 420, 100, 50) $GUI_Button_5 = GUICtrlCreateButton("$5", 520, 420, 100, 50) $GUI_Button_10 = GUICtrlCreateButton("$10", 620, 420, 100, 50) $GUI_Button_20 = GUICtrlCreateButton("$20", 520, 470, 100, 50) $GUI_Button_50 = GUICtrlCreateButton("$50", 620, 470, 100, 50) GUISetState() $oIE.navigate("http://www.msn.com/") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("http://www.msn.com/") Case $msg = $GUI_Button_MakeCard $oIE.navigate("http://www.msn.com/") Case $msg = $GUI_Button_AddCredits $oIE.navigate("http://www.msn.com/") ;The send is the first problem I need to get around. The keystroke isn't sent to the embedded Browser. I've tried winactivate but it just opened a new IE window and then inputed the text. send ("{enter}") Case $msg = $GUI_Button_Logout $oIE.navigate("httop://www.msn.com/") Case $msg = $GUI_Button_5 ;I only need these to be sent to the cursor in the input box which apears automatically(like the search bar on msn.com)... I've tried winactivate but it just opened a new IE window and then inputed the text. What am I missing? Send("5") Case $msg = $GUI_Button_10 send ("10") Case $msg = $GUI_Button_20 send ("20") Case $msg = $GUI_Button_50 send ("50") EndSelect WEnd GUIDelete() EndFunc -
I need to create an application that will run in the forground and control a webpage, including text input. It will be used on a touch screen based machine. For my first version, I've started by creating a GUI with the IE embedded function and I've gotten all my buttons that point to links to work fine. However, I cant get the buttons that represent a keystroke to translate to the appropriate text box within the webpage. It acts as though when the button is pressed, the embedded IE looses focus. Any help on this would be greatly appreciated. I have about three days to get it working and I've only been using AutoIt for about a week...lol Sorry for being a newb. Getting back to my topic title,... after I get the first version working and in use... I want to create a GUI that will take over the entire screen and translate the buttons pressed in the GUI, to the webpage running in the background and also display a text box that represents whats being inputed into the IE text boxes...(For example: login, dollar amount taken in, and dollar amount owed ...etc) Thank you in advance for any advice or any suggestions on appropriate functions.