Jump to content

DarkAnel

Active Members
  • Posts

    22
  • Joined

  • Last visited

DarkAnel's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. thank you for the idea i have done a .bat and its working very well i will post the code here soon but i really want to create a GUI this week for this script
  2. i need to send a message on the remote computer, notepad need to open and notepad need to open a source file dirrectly by UNC serverfile.txt i dont think psexec can open directly the file serverfile.txt i think i need to past by the notepad.exe serverfile.txt
  3. Hi everybody i have to find a solution to save time. I got barcode on 10 BackUp TAPE and i need to inventory all of them. The tape can be at 3 place and i want to look on my notepad to find where is my BackUpTape. First i want to take my usb scaner and take a $barcode of it after i want to select the place where i have put the tape $place1, $place2, $place3 and when i push a enter button i want to send it in a notepad $barcode && $place? && $time someone have a simple idea? thank you
  4. I need this help again... somebody can help me with this wrapping value the notepad open but notepad can not open the network file on serveurfile.txt
  5. i need some help to finish the script please
  6. i have made the research but i have find nothing about my problem but i have learn a couple thing, but now my problem is not solved, all work good the notepad open but notepad don't take my last variable $msgfile to open the right text file on the computer what i can do i have no idea
  7. I have try what you have said Realm, i will give all my code it will be more simple thanks for your help the notepad popup but the notepad don't open $msgfile #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Constants.au3> #include <StaticConstants.au3> Local $Gui010 = GUICreate("RemotePopUp", 800, 600) Local $Button1 = GUICtrlCreateButton("Send PSEXEC",225,140,400,25) GUICtrlSetBkColor($Button1,0xaaaaaa) GUICtrlSetFont($Button1,10,800,default,'times new roman') Local $clear = GUICtrlCreateButton("Clear Display", 700, 10, 90, 25) GUICtrlSetBkColor($clear,0xaaaaaa) GUICtrlSetFont($clear,10,800,default,'times new roman') Local $about = GUICtrlCreateButton("About", 700, 40, 90, 25) GUICtrlSetBkColor($about,0xaaaaaa) GUICtrlSetFont($about,10,800,default,'times new roman') GUICtrlCreateLabel("User Name",150,15,75,25) GUICtrlCreateLabel("Password",150,45,75,25) GUICtrlCreateLabel("Host File",150,75,75,25) GUICtrlCreateLabel("Msg File",150,105,75,25) Local $user = GUICtrlCreateEdit('',225,10,180,25,$ss_sunken) GUICtrlSetFont($user,12,800) GUICtrlSetState($user,$gui_focus) Local $pass = GUICtrlCreateEdit('',225,40,180,25,$ss_sunken) GUICtrlSetFont($pass,12,800) GUICtrlSetState($pass,$gui_focus) Local $hostfile = GUICtrlCreateEdit('c:Techip.txt',225,70,400,25,$ss_sunken) GUICtrlSetFont($hostfile,12,800) GUICtrlSetState($hostfile,$gui_focus) Local $msgfile = GUICtrlCreateEdit('infohhrinfoappsoftwaretest.txt',225,100,400,25,$ss_sunken) GUICtrlSetFont($msgfile,12,800) GUICtrlSetState($msgfile,$gui_focus) Local $Edit010 = GUICtrlCreateEdit("", 10,200,780,350, $ES_AUTOVSCROLL + $WS_VSCROLL + $ws_hscroll + $es_readonly) GUICtrlSetFont(-1,8.5,800,default,'courier new') Local $help = GUICtrlCreateButton("Help", 700, 70, 90, 25) GUICtrlSetBkColor($help,0xaaaaaa) GUICtrlSetFont($help,10,800,default,'times new roman') GUISetState(@SW_SHOW) net_properties() Func net_properties() Local $rslt,$out While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $rslt = Run(@ComSpec & " /c psexec -i -s -d -u " & '"' & GUICtrlRead($user) & '" -p ' & '"' & GUICtrlRead($pass) & '"' & " @" & '"' & GUICtrlRead($hostfile) & '"' & " notepad.exe " & '"' & GUICtrlRead($msgfile) & '"', @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD) ;$rslt = Run(@ComSpec & " /c psexec -i -s -d -u " & '"' & GUICtrlRead($user) & '" -p ' & '"' & GUICtrlRead($pass) & '" ' & "notepad.exe " & '"' & GUICtrlRead($hostfile) & '"' & " @ " & '"' & GUICtrlRead($msgfile) & '"', @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD) ;$rslt = Run(@ComSpec & " /c psexec -i -s -d -u " & '"' & GUICtrlRead($user) & '" -p ' & '"' & GUICtrlRead($pass) & '"' & " @" & '"' & GUICtrlRead($hostfile) & '" ' & "notepad.exe " & '"' & GUICtrlRead($msgfile) & '"', @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD) While 1 $out = StdoutRead($rslt) If @error then exitloop GUICtrlSetData($edit010,$out & @lf,1) WEnd Case $msg = $help MsgBox(0, "Help", "Il est important de mettre le username et password pour pouvoir executer une tâche sur un pc distant. File: le fichiers que notepad va ouvrir, il doit être situé sur un lecteur réseau accèssible à tous") Case $msg = $about MsgBox(0, "About", "This Script was created by Eric Boudreau") Case $msg = $clear GUICtrlSetData($edit010,"") EndSelect WEnd EndFunc
  8. I need to wrap this command correctly but it didn't work correctly , the outgoing command need to look like psexec -i -s -d -u $user -p $pass @$hostfile notepad.exe $msgfile thank you to help me $rslt = Run(@ComSpec & " /c psexec -i -s -d -u " & '"' & GUICtrlRead($user) & '" -p ' & '"' & GUICtrlRead($pass) & '"' & " @ " & '"' & GUICtrlRead($hostfile) & '" ' & "notepad.exe " & '"' & GUICtrlRead($msgfile) & '"', @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD)
  9. someone can tell me what is wrong with my wraping?? it need to look like psexec -i -s -d -u $user -p $pass @$hostfile notepad.exe $msgfile $rslt = Run(@ComSpec & " /c c:PSToolsPsExec -i -s -d -u " & '"' & GUICtrlRead($user) & '" -p ' & '"' & GUICtrlRead($pass) & '"' & " @ " & '"' & GUICtrlRead($hostfile) & '" ' & "notepad.exe " & '"' & GUICtrlRead($msgfile) & '"', @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD)
  10. ok i have found the way to add 2 $parameter $rslt = Run(@ComSpec & " /c ping " & GUICtrlRead($parm) + GUICtrlRead($ip)
  11. This is for me a good start for my script i love the idea, i have change the CMD ipconfig for a CMD PING with 2 paramater but what is the best way to take the second paramater ; example of using stdout with network commands #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Constants.au3> #include <StaticConstants.au3> Local $Gui010 = GUICreate("Network Properties", 800, 600) Local $Button1 = GUICtrlCreateButton("PING",10, 10, 75, 25) Local $Button2 = GUICtrlCreateButton("NETSTAT", 90, 10, 75, 25) Local $clear = GUICtrlCreateButton("Clear Display", 700, 10, 90, 25) GUICtrlSetBkColor($clear,0xaaaaaa) GUICtrlSetFont($clear,10,800,default,'times new roman') GUICtrlCreateLabel("PARM = ",200,15,75,25) GUICtrlCreateLabel("PARM2 = ",350,15,75,25) Local $parm = GUICtrlCreateEdit('',250,10,75,25,$ss_sunken) GUICtrlSetFont($parm,12,800) GUICtrlSetState($parm,$gui_focus) Local $ip = GUICtrlCreateEdit('',400,10,125,25,$ss_sunken) GUICtrlSetFont($ip,12,800) GUICtrlSetState($ip,$gui_focus) Local $Edit010 = GUICtrlCreateEdit("", 10,200,780,350, $ES_AUTOVSCROLL + $WS_VSCROLL + $ws_hscroll + $es_readonly) GUICtrlSetFont(-1,8.5,800,default,'courier new') GUISetState(@SW_SHOW) net_properties() Func net_properties() Local $rslt,$out While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $rslt = Run(@ComSpec & " /c ping " & GUICtrlRead($parm +$ip), @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD) ; Will Run ipco.exe that exist in the same folder as the script While 1 $out = StdoutRead($rslt) If @error then exitloop GUICtrlSetData($edit010,$out & @lf,1) WEnd Case $msg = $Button2 $rslt = Run(@ComSpec & " /c netstat " & GUICtrlRead($parm), @SystemDir, @SW_HIDE, $STDERR_MERGED + $STDOUT_CHILD) ; Will Run ipco.exe that exist in the same folder as the script While 1 $out = StdoutRead($rslt) If @error then exitloop GUICtrlSetData($edit010,$out & @lf,1) WEnd Case $msg = $clear GUICtrlSetData($edit010,"") EndSelect WEnd EndFunc
  12. i have try this to do something easy but its not work, i will search about wrapping vraiable in quotations #AutoIt3Wrapper_Change2CUI=n #include <Constants.au3> $ip = 192.168.0.1 $cmd = ping Local $foo = run("cmd.exe" & " /c " & "$cmd" & "$ip", @SystemDir, @SW_MAXIMIZE, $STDIN_CHILD + $STDOUT_CHILD) ConsoleWrite("open wodrivswt4" & @CR) Local $data While True $data &= StdoutRead($foo) If @error Then ExitLoop Sleep(25) WEnd MsgBox(0, "Debug", $data)
  13. Ok i want to explain what i want to do, i want a form in a gui with like 4 questions, (GUICtrlCreateInput) and i want to take the return of these questions to create 4 $var. after all 4 questions complete i want to execute a cmd promp with a start button and include my var in a syntaxe like that #psexec -i -u $var_user -p $var_password @ $var_hostfile -e notepad.exe $var_txt this is the begin of my FORM #include <GUIConstants.au3> $widthCell=70 GUICreate(" My GUI", 220,200, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018) GUICtrlCreateLabel ("Username: ", 5, 10, $widthCell) GUICtrlCreateLabel ("Password: ", 5, 40, $widthCell) GUICtrlCreateLabel ("HOST File: ", 5, 70, 100) GUICtrlCreateLabel ("TXT File: ", 5, 100, 100) $username = GUICtrlCreateInput ("", 90, 5, 100, 20) $password = GUICtrlCreateInput ("", 90, 35, 100, 20) $hostfile = GUICtrlCreateInput ("", 90, 65, 100, 20) $txtfile = GUICtrlCreateInput ("", 90, 95, 100, 20) $btn = GUICtrlCreateButton ("Ok", 100, 120, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() INCLUDE CODE HERE exitloop EndSelect Wend i have found this script to send command to CMD.EXE but it not take $var #AutoIt3Wrapper_Change2CUI=n #include <Constants.au3> Local $foo = run("cmd.exe" & " /c " & "ping www.google.com", @SystemDir, @SW_MAXIMIZE, $STDIN_CHILD + $STDOUT_CHILD) ConsoleWrite("open wodrivswt4" & @CR) Local $data While True $data &= StdoutRead($foo) If @error Then ExitLoop Sleep(25) WEnd MsgBox(0, "Debug", $data)
×
×
  • Create New...