Jump to content

lcgreenwald

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Location
    Minnesota

lcgreenwald's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Try using a rsa key pair for authentication instead of login/password.
  2. Use MouseGetPos() and subtract GUIGetCursorInfo()
  3. Here is one way to do it. #NoTrayIcon While True If @MON = 7 And @MDAY = 13 And @HOUR = 9 And @MIN = 30 Then MsgBox(64, "", "It's your birthday !") ExitLoop EndIf Sleep(1000) WEnd
  4. How about RUN(@ComSpec & "runas /user:username password" & "'" & " program")
  5. Add another couple of case statements. If the file is deleted then set a variable. If the file exists and the file had been deleted then clear the deleted var and set the gui state to show.
  6. Is this doing what you are looking for? While 1 $msg = TrayGetMsg() $xmsg = GUIGetMsg() Select Case $xmsg = $sent1 WinSetState("CONTROL", "", @SW_HIDE) Case $msg = $Show WinSetState("CONTROL", "", @SW_SHOW) Case $msg = $Hide WinSetState("CONTROL", "", @SW_HIDE) Case $msg = $about MsgBox(64, "about:", "MyProgram 1.0") Case $msg = $exit ; Delete the tray items and close the GUI TrayItemDelete($Show) TrayItemDelete($spacer1) TrayItemDelete($about) TrayItemDelete($spacer2) TrayItemDelete($Hide) TrayItemDelete($spacer3) TrayItemDelete($exit) TrayItemDelete($spacer4) GUIDelete() ExitLoop Case $xmsg = $GUI_EVENT_CLOSE GUISetState(@SW_HIDE) Case $xmsg = $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE) Case $msg = $TRAY_EVENT_PRIMARYDOUBLE GUISetState(@SW_SHOW) EndSelect WEnd
  7. You are almost there. Change this part of your script. TraySetState() While 1 $msg = TrayGetMsg() $xmsg = GUIGetMsg() Select Case $xmsg = $sent1 WinSetState("CONTROL", "", @SW_HIDE) Case $msg = $Show WinSetState("CONTROL", "", @SW_SHOW) Case $msg = $about MsgBox(64, "about:", "MyProgram 1.0") Case $msg = $exit ; Delete the tray items and close the GUI TrayItemDelete($Show) TrayItemDelete($spacer1) TrayItemDelete($about) TrayItemDelete($spacer2) TrayItemDelete($exit) TrayItemDelete($spacer3) GUIDelete() ExitLoop EndSelect WEnd ;Exit <-- This Exit is causing your program to exit. EndIf WEnd Exit
  8. $search = FileFindFirstFile("J:\Dokumenter\*.doc") If $search = -1 Then MsgBox(0, "Error", "No files matched the search pattern") Else While $search <> -1 $file = FileFindNextFile($search) If @error = 1 Then ExitLoop MsgBox(0, "DOC file Found", $file) WEnd EndIf
  9. Try something like this: $search = FileFindFirstFile("J:\Dokumenter\*.doc") While 1 $file = FileFindNextFile($search) If @error = 1 Then Exit MsgBox(0, "DOC file Found", $file) WEnd
  10. Try this. ;Settings $script1_wait = 0 $script1_wait2 = 60 $script2_wait = 0 $script2_wait2 = 120 $test = 1 $test2 = 1 ;Functions Func _script1() If $test = 1 Then ;"My script goes here." EndIf EndFunc ;==>_script1 Func _script2() If $test2 = 1 Then ; "My 2nd script goes here" EndIf EndFunc ;==>_script2 ;Script While 1 $script1_wait = $script1_wait + 1 $script2_wait = $script2_wait + 1 Sleep(1000) If $script1_wait = $script1_wait2 Then $script1_wait = 0 _script1() EndIf If $script2_wait = $script2_wait2 Then $script2_wait = 0 _script2() EndIf WEnd
  11. Func _ra ($file) RunAsSet("Admin", @ComputerName, "a") $reg = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\BISD", "verify") Run($file) If $reg = "verify" Then Return RunAsSet("Administrator", @ComputerName, "b") $reg = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\BISD", "verify") Run($file) If $reg = "verify" Then Return EndFunc ;==>_ra
  12. Have a look at the TCPSend and TCPRecv examples in Help. You should be able to incorporate them to do what you want.
×
×
  • Create New...