Jump to content

MrWho

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by MrWho

  1. Hi Guys, One of the friends from here posted this script Is there a way to feed a list of computers to that script .. ( list of IP/Hostnames ) Thank you very much #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <Constants.au3> #include "array.au3" #include <GUIConstants.au3> Dim $line Dim $item $GUI = GUICreate("My GUI" , 800 , 600) $listview = GuiCtrlCreateListView ("Indication|Computer|Ip|Status ", 40,40,400,500) GUISetState (@SW_SHOW) $foo = Run(@ComSpec & " /c net view ", @SystemDir, @SW_HIDE,2) While 1 $sActiveLine = StdoutRead($foo) If @error Then ExitLoop If StringLeft($sActiveLine, 2) = "\\" Then $line &= StringReplace($sActiveLine, "\\" , "") & @CRLF EndIf Wend $line = StringReplace($line, " " , "") $line = StringReplace($line, @LF,"") $line = StringSplit ($line, @CR) TCPStartup() For $i = 1 To $line[0] - 1 $result = Ping($line[$i] ,1) If NOT @ERROR Then $line[$i] = GuiCtrlCreateListViewItem($line[$i] & "|" & TCPNameToIP($line[$i]) &"|ONLINE",$listview) GUICtrlSetImage(-1, "shell32.dll",21) Else $line[$i] = GuiCtrlCreateListViewItem($line[$i] & "|" & TCPNameToIP($line[$i]) &"|OFFLINE",$listview) GUICtrlSetImage(-1, "shell32.dll",22) EndIf Next TCPShutdown() while 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd
  2. Thank You !
  3. Hello Guys, I used AutoIT to make small application and love it ... I wonder if there is away ... to make a script that will show a MSG on Startup ... after user login to the system ... Small popup .. with a note ... It would be perfect if script could lock - start menu and desktop until users click CLOSE on the popup. I just want to include small instructions and trying to make sure that users will read them before using computer. Can this be done ? Thank you.
  4. Hey Guys, Any ideas how to make calendar showing todays date ? DateTimeConstants.au3 I need to right click Go To Today so its scrolls there ... is there way to make it go there automatically ? Thank You Solved please delete topic I made small mistake in code ...
  5. Right... Could I get some tips how to solve this ?
  6. I did try it ... with comma C:\Documents and Settings\Administrator\Desktop\test2.au3(52,49) : WARNING: $ExitID: possibly used before declaration. Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\test2.au3(52,49) : ERROR: $ExitID: undeclared global variable. Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\test2.au3 - 1 error(s), 1 warning(s)
  7. Hey Guys, Could use some help ... C:\Documents and Settings\Administrator\Desktop\test2.au3(11,67) : ERROR: syntax error Local $DID, $FID, $GpAID, $GpBID, $GpCID, $PCLID, $ECLID, $HOWID $msg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Administrator\Desktop\test2.au3 - 1 error(s), 0 warning(s) #include <GUIConstantsEx.au3> #include <DateTimeConstants.au3> Opt('MustDeclareVars', 0) _Main() Func _Main() Local $DID, $FID, $GpAID, $GpBID, $GpCID, $PCLID, $ECLID, $HOWID $msg GUICreate("Swiss Knife", 400, 400) GUICtrlCreateLabel("....... MSG MSG .....", 10, 10) $DID = GUICtrlCreateButton("Msg 1", 16, 64, 153, 31) $FID = GUICtrlCreateButton("Msg 2", 16, 104, 155, 33) $GpAID = GUICtrlCreateButton("Msg 3", 14, 143, 157, 33) $GrpahsBID = GUICtrlCreateButton("Msg 4", 17, 186, 156, 33) $GrpahsCID = GUICtrlCreateButton("Msg 5", 20, 225, 156, 33) $PCLID = GUICtrlCreateButton("Msg 6", 18, 264, 372, 33) $ECLID = GUICtrlCreateButton("Msg 7", 23, 300, 372, 33) $HOWID = GUICtrlCreateButton("Msg 8", 27, 335, 372, 33) $MonthCal1 = GUICtrlCreateMonthCal("2009/11/30", 208, 56, 184, 177) GUISetState() ; display the GUI Do $msg = GUIGetMsg() Select Case $msg = $DID ShellExecute("C:\Documents and Settings\All Users\Desktop\test1.bat", "", @ScriptDir, "") Case $msg = $FID ShellExecute("C:\Documents and Settings\All Users\Desktop\test2.bat", "", @ScriptDir, "") Case $msg = $GpAID ShellExecute("C:\Documents and Settings\All Users\Desktop\test3.bat", "", @ScriptDir, "") Case $msg = $GrpahsBID ShellExecute("C:\Documents and Settings\All Users\Desktop\test4.bat", "", @ScriptDir, "") Case $msg = $GpCID ShellExecute("C:\Documents and Settings\All Users\Desktop\test5.bat", "", @ScriptDir, "") Case $msg = $PCLID ShellExecute("C:\Documents and Settings\All Users\Desktop\test6.bat", "", @ScriptDir, "") Case $msg = $ECLID ShellExecute("C:\Documents and Settings\All Users\Desktop\test7.bat", "", @ScriptDir, "") Case $msg = $HOWID ShellExecute ("http://www.google.com.au") EndSelect Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID EndFunc ;==>_Main
  8. Thank You
  9. Hey Guys, Can I use AutoIT to create GUI menu that will be used to Execute batch files ? 5 buttons - Each Button = Different Batch File any tips how to go around that ? Thx
×
×
  • Create New...