Sign in to follow this  
Followers 0
anixon

Auto Start a Script

5 posts in this topic

In Windows function gpedit.msc I have configure Local Computer Policy\User Configuration \Windows Settings\Scripts\Startup\ to launch

myautoitscript.exe.

As soon as Windows logs on the Script runs an INPUTBOX routine [requesting a user name and password] for a brief period the Scripts INPUTBOX is active, however other processes/services are also started as part of the logon process like my antivirus, firewall, network connection etc.

As a consequence the AutoIT Script INPUTBOX does not remain active and after all logon processes have completed you have to click on it to make

it active so that it will respond to input.

Is there a process which will keep the INPUTBOX active or alternatively how do I make it the last process to Start after logging on.. Sleep statement perhaps

which delays the code putting up the INPUTBOX or is their some way of interogating the system to establish that logon has been completed?

Thanks for your help

Ant...

Share this post


Link to post
Share on other sites



In Windows function gpedit.msc I have configure Local Computer Policy\User Configuration \Windows Settings\Scripts\Startup\ to launch

myautoitscript.exe.

As soon as Windows logs on the Script runs an INPUTBOX routine [requesting a user name and password] for a brief period the Scripts INPUTBOX is active, however other processes/services are also started as part of the logon process like my antivirus, firewall, network connection etc.

As a consequence the AutoIT Script INPUTBOX does not remain active and after all logon processes have completed you have to click on it to make

it active so that it will respond to input.

Is there a process which will keep the INPUTBOX active or alternatively how do I make it the last process to Start after logging on.. Sleep statement perhaps

which delays the code putting up the INPUTBOX or is their some way of interogating the system to establish that logon has been completed?

Thanks for your help

Ant...

Thanks for the reply I have read the information which has not given me any clues on how to deal with my issue. The person seeking help did not actually disclose what the solution was or perhaps I missed it. Anyway if this was the solution

$Confirmation = InputBox("*Lockout*", "Please confirm Your Password.", "", "*", 150, 100, 50, 50, 100)

It does not stay on top during the logon process.

Perhaps the solution is adopting a GUI type INPUTBOX?

aNT.. :whistle:

Share this post


Link to post
Share on other sites

Thanks for the reply I have read the information which has not given me any clues on how to deal with my issue. The person seeking help did not actually disclose what the solution was or perhaps I missed it. Anyway if this was the solution

$Confirmation = InputBox("*Lockout*", "Please confirm Your Password.", "", "*", 150, 100, 50, 50, 100)

It does not stay on top during the logon process.

Perhaps the solution is adopting a GUI type INPUTBOX?

aNT.. :)

I posted a UDF there that is a custom _InputBox() that will keep it on top by default :whistle:

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I posted a UDF there that is a custom _InputBox() that will keep it on top by default :whistle:

If this is the code you are referring to unfortunately it does remain as the active window during logon

Cheers Ant.. :)

CODE
#include <guiconstants.au3>

MsgBox(0, 'Info', _InPutBoxEx('My Input Box'))

MsgBox(0, 'Info', _InPutBoxEx('My Input Box', 'Some Text', 300))

Func _InPutBoxEx($sTitle, $sText = '', $iWidth = 200, $iHeight = 75, $iOnTop = 1, $nInStyle = -1, $nInStyleEx = -1)

Local $aCID[5], $iY = 0, $sRead

If $iWidth < 175 Then $iWidth = 175

If $iHeight < 75 Then $iHeight = 75

If $sText <> '' Then $iY = 20

Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight + $iY)

If $sText <> '' Then $aCID[1] = GUICtrlCreateLabel($sText, 10, 10, $iWidth - 20, 20, $ES_CENTER)

$aCID[2] = GUICtrlCreateInput('', 10, 10 + $iY, $iWidth - 20, 20, $nInStyle, $nInStyleEx)

$aCID[3] = GUICtrlCreateButton('OK', (($iWidth - 150) / 2), 40 + $iY, 75, 25, $BS_DEFPUSHBUTTON)

$aCID[4] = GUICtrlCreateButton('Cancel', (($iWidth - 150) / 2) + 80, 40 + $iY, 75, 25)

WinSetOnTop($hGUI, '', $iOnTop)

GUISetState()

While 1

Switch GUIGetMsg()

Case - 3, $aCID[4]

GUIDelete($hGUI)

Return ''

Case $aCID[3]

$sRead = GUICtrlRead($aCID[2])

GUIDelete($hGUI)

Return $sRead

EndSwitch

WEnd

EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0