Jump to content

Script won't complete


Doppio
 Share

Recommended Posts

The following script configures my wireless settings on a Intel Card, but if the user moves the mouse the focus changes to the current mouse possition and the script fails to complete!.

How can I prevent that?

Thanks.

#include "Misc.au3"
_Singleton('Intel Macro2.exe', 0)

#region --- AutoIt Macro Generator V 0.21 beta ---
AutoItSetOption("WinWaitDelay", 500) ;(milliseconds)
AutoItSetOption("TrayIconDebug", 1) ;0-off


$Username = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Username")
$Password = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Password")
$profileName = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","profileName")    
$SSID = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","SSID")

Opt("WinTitleMatchMode", 4)
Run("C:\Program Files\Intel\Wireless\Bin\iFrmewrk.exe")

WinWait("Intel(R) PROSet/Wireless","Wireless networks found. Selec")
send("!p")

WinWait("Profiles","Once you connect to a network,")
SEND("!n")

WinWait("Connecting to ","User Na&me:")
send($Username)
Send("{TAB 2}")
send($Password)
ControlClick("Connecting to ","User Na&me:","Button3")

WinWait("Profiles","Once you connect to a network,")
SEND("!c")

WinWait("Intel(R) PROSet/Wireless","You are connected to MYNETWORK.")
SEND("!c")
Link to comment
Share on other sites

The following script configures my wireless settings on a Intel Card, but if the user moves the mouse the focus changes to the current mouse possition and the script fails to complete!.

How can I prevent that?

Thanks.

#include "Misc.au3"
_Singleton('Intel Macro2.exe', 0)

#region --- AutoIt Macro Generator V 0.21 beta ---
AutoItSetOption("WinWaitDelay", 500);(milliseconds)
AutoItSetOption("TrayIconDebug", 1);0-off
$Username = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Username")
$Password = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Password")
$profileName = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","profileName")    
$SSID = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","SSID")

Opt("WinTitleMatchMode", 4)
Run("C:\Program Files\Intel\Wireless\Bin\iFrmewrk.exe")

WinWait("Intel(R) PROSet/Wireless","Wireless networks found. Selec")
send("!p")

WinWait("Profiles","Once you connect to a network,")
SEND("!n")

WinWait("Connecting to ","User Na&me:")
send($Username)
Send("{TAB 2}")
send($Password)
ControlClick("Connecting to ","User Na&me:","Button3")

WinWait("Profiles","Once you connect to a network,")
SEND("!c")

WinWait("Intel(R) PROSet/Wireless","You are connected to MYNETWORK.")
SEND("!c")
Instead of using Send(), use ControlSend() or ControlClick(), as it won't require the "Wireless Settings" window to be active.

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

The following script configures my wireless settings on a Intel Card, but if the user moves the mouse the focus changes to the current mouse possition and the script fails to complete!.

How can I prevent that?

Thanks.

#include "Misc.au3"
_Singleton('Intel Macro2.exe', 0)

#region --- AutoIt Macro Generator V 0.21 beta ---
AutoItSetOption("WinWaitDelay", 500);(milliseconds)
AutoItSetOption("TrayIconDebug", 1);0-off
$Username = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Username")
$Password = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","Password")
$profileName = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","profileName")    
$SSID = regread("HKLM\SOFTWARE\DIIT\Wireless\Settings","SSID")

Opt("WinTitleMatchMode", 4)
Run("C:\Program Files\Intel\Wireless\Bin\iFrmewrk.exe")

WinWait("Intel(R) PROSet/Wireless","Wireless networks found. Selec")
send("!p")

WinWait("Profiles","Once you connect to a network,")
SEND("!n")

WinWait("Connecting to ","User Na&me:")
send($Username)
Send("{TAB 2}")
send($Password)
ControlClick("Connecting to ","User Na&me:","Button3")

WinWait("Profiles","Once you connect to a network,")
SEND("!c")

WinWait("Intel(R) PROSet/Wireless","You are connected to MYNETWORK.")
SEND("!c")
Hi, maybe you can add at the top of your script

BlockInput (1)oÝ÷ Ù©ÝjÛayéÝjëh×6BlockInput (0)

Ctrl+Alt+Del will re-enable input if the script don't terminate

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...