Jump to content

johnmcconnell

Members
  • Posts

    2
  • Joined

  • Last visited

johnmcconnell's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. here try this a little some thing i made up to keep my password prg from losing focus the udf #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=beta #AutoIt3Wrapper_Outfile=1.exe #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=p #AutoIt3Wrapper_Res_LegalCopyright=Micro-tech #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Includes #include-once ;=============================================================================== ; ; Function Name: _WinKeepActive() ; Description: Monitors your app window to ensure it is always active ; Syntax.........:_WInKeepActive(title,text) ; ; ; ;Author: John McConnell ;Notes: ; ;Returns @error = 1 ($KeepActive = Not compiled Script) ; ;=============================================================================== Func _WinKeepActive($sTitle, $sText) Local $sKeepActive, $stemp Local $hTemp = '' If Not @Compiled Then Return SetError(1) If Not IsDeclared("sKeepActive") Then Exit MsgBox(0, "Error", "$sKeepActive is not declared") $sKeepActive = 'Opt ("TrayIconHide",1)' & @CRLF & _ "WinWaitActive('" & $sTitle & "')" & @CRLF & _ ; wait here for window to come up and Active "While 1" & @CRLF & _ "sleep(200)" & @CRLF & _ "WinActivate('" & $sTitle & "','" & $sText & "')" & @CRLF & _ "If WinExists('" & $sTitle & "') = 0 Then" & @CRLF & _ ; if window dose not exist then exit " EXIT" & @CRLF & _ "EndIf " & @CRLF & _ "Wend" $hTemp = FileOpen(@TempDir & "\KeepActive.au3", 2) ; write file to temp dir FileWrite($hTemp, $sKeepActive) FileClose($HTemp) $sKeepActive = Run(FileGetShortName(@AutoItExe) & " /Autoit3ExecuteScript " & @TempDir & "\KeepActive.au3", @TempDir) ; run file from temp dir ProcessSetPriority($sKeepActive, 3) Return SetError(0) EndFunc ;==>_WinKeepActive how to use #include "_WinKeepActive.au3" _WinKeepActive("TEST", ">") $a = InputBox("TEST",">") let me know how it works john
  2. like it lot! are you going to make one avaible for the new firefox 3.0b3 john
×
×
  • Create New...