Jump to content

Search the Community

Showing results for tags 'send'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 50 results

  1. Hello all! I'm stuck at a seemingly simple part of my script. Using IE, I'm filling out a web form that involves clicking a "Browse" button and selecting a file. Once the file explorer dialog opens, however, I am unable to control it. I have a string, which is the name of the file I want, and I'm trying to insert it into the 'File name:' text box in the dialog (which already has focus), but it doesn't get inserted. I've tried ClipPut and Send. What's even more concerning is, when I close the dialog, the string is then pasted into the very next window that has focus, which is often SciTE. It's like that Browse's file open dialog halts all processes. Once it's closed, the script continues. ;~ Open a IE window and navigate to the login page. Global $oIE = _IECreate($urlBBLogin) _IELoadWait($oIE) ;~ Recognize the form on this page (login input boxes). Local $oForm = _IEFormGetObjByName($oIE, "login") Local $oTextLogin = _IEFormElementGetObjByName($oForm, "user_id") Local $oTextPass = _IEFormElementGetObjByName($oForm, "password") ;~ Enter the Automation user credentials into the form. _IEFormElementSetValue($oTextLogin, $bbUsername) _IEFormElementSetValue($oTextPass, $bbPassword) ;~ Click the Login button. _IEFormSubmit($oForm) _IELoadWait($oIE) ;~ Navigate to the feedfile upload page. _IENavigate($oIE, $urlUpload) _IELoadWait($oIE) ;~ Click the Browse button Local $Browse = _IEGetObjById($oIE, "feedFile_chooseLocalFile") _IEAction($Browse, "Click") Local $Browse = WinWait("Choose File to Upload") ;~ Open the file we created. WinActivate($Browse) Send($finalFile) Has anyone else experienced this problem? Any ideas to get around it? Am I approaching this the wrong way? Any support is greatly appreciated. Thank you.
  2. I was wondering if there was a library or something which provides the capability to Send() to inactive windows, and I know what you're thinking, I could just use ControlSend(); the reason I can't use that in this situation is because I need to hold down keys for specific prolonged periods of time. Also activating the window, Send()ing then de-activating the window isn't really an option here, I need the target window to always be in the background. I've looked around the forums for an adequate amount of time and didn't find anything useful, perhaps because the threads were all 10 years old, nevertheless, if anyone has any suggestions they would be greatly appreciated. Thanks!
  3. I've made this HTTP lib to simplify HTTP requests, mainly when dealing about POST data or file uploads. Three functions are available: string _HTTP_Get ( string $sURL ) string _HTTP_Post ( string $sURL , string $sPostData ) string _HTTP_Upload ( string $sURL , string $sFilePath , string $sFileField , string $sPostData = '' , string $sFilename = Default) Additionaly, two helper functions are also available: URLEncode($sStr) URLDecode($sStr) Full documentation: https://github.com/jesobreira/HTTP.au3/blob/master/README.md Fork me on Github: https://github.com/jesobreira/HTTP.au3 Download lib + docs: https://github.com/jesobreira/HTTP.au3/archive/master.zip
  4. Hi, The FAQ proposed as a solution to keys getting stuck to do this command ControlSend("", "", "", "text", 0) However this sends "text" to the last active control if I am not mistaken.I have tried this with controlsend("", "", "", "{altup}{shiftup}{ctrlup}", 0) This is already a lot better but still fails 1/10 I cannot allow the script to send "text" to the last active control, and its a bit silly to let it send to somewhere where its harmless no? Are there any other methods of unstucking keys?
  5. Hello! I have made a program, that opens a folder, and then store the path ("C:\programFiles\etc") in a variable. Then i need to open the command panel as administrator, and write in the stored path, and some other text. Can i somehow instantly copypaste the text i needed, instead of writing in the command panel with the Send commands? #RequireAdmin #include <MsgBoxConstants.au3> Global Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Global $sFileSelectFolder = FileSelectFolder($sMessage, "") If @error Then MsgBox($MB_SYSTEMMODAL, "", "Nem választottál ki mappát!") Exit EndIf Global $Tiff_path = $sFileSelectFolder & "\TiffChecker_2_32" FileCopy( "C:\TiffChecker_2_32.exe" , $sFileSelectFolder) $CMD = $Tiff_path & " " & $sFileSelectFolder & " /s/d" Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send($CMD) Sleep(1000) Send("{ENTER}") sleep(1000) MsgBox(0,"Press OK", "Press OK to continue") FileCopy("C:\Tiffchecker.txt", $sFileSelectFolder) Also, how do i close the command panel, when the program is finished? (usually its under 1 second, so after the send i just put a Sleep function there)
  6. I would like to know if there is a way to make the send cmd send characters when using Graphical AutoIt Debugger By Stumpii, If Not WinActive("Setup - UltraVNC","Setup is preparing to install") Then WinActivate("Setup - UltraVNC","Setup is preparing to install") WinWaitActive("Setup - UltraVNC","Setup is preparing to install") Send("{ALTDOWN}f{ALTUP}") ;Finish The debugger when using step mode will execute the Send cmd line but the window doesn't receive the input. Thanks, Docfxit
  7. Hi friends, I'm trying to send SHIFTDOWN, to keep the Shift key pressed until I close the program or releases the key. Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is down. Type something: ") $ret = Msgbox(0,"", "Press and release shift key manually and select [Ok] to continue") $text = InputBox("Shift key up", "Shift key is released manually, now type something: ") Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down Agin", "Shift key is pressed again, now type something: ") In the above program sequence, 1. Send SHIFTDOWN from program, Works as we type in the text are in Capital letters 2. Manually presses and releases the SHIFT button. SHIFT key is released as when we type, text is in small letters only. 3. Again send SHIFTDOWN from program, but not working. When we type the letters are in small letters. If we send a SHIFTUP before sending the SHIFTDOWN again, then it is working correctly and the text appears in capital letters only. Can any one explain why this happens? Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is down. Type something: ") $ret = Msgbox(0,"", "Press and release shift key and select [Ok] to continue") $text = InputBox("Shift key up", "Shift key is released manually, now type something: ") Send ( "{SHIFTUP}") sleep(100) Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is pressed, now type something: ") Thank you.
  8. Hello everyone, long time since I made a post in the H&S sub-forum I am working on a project where in a situation I would have to hold down an arrow key and release it in another statement/command, however when I wrote the code it isn't working exactly like I thought it would. Here is an example: Send("{UP down}") Sleep(10000) Send("{UP up}") This should hold the up arrow key for 10 seconds before releasing it again, but when I run this code the cursor in SciTE moves up only once If I hold the up arrow manually for 10 seconds it "repeats" and the cursor moves up several times until I release the key... Is this a known limitation of Send? Is there any other way I can accomplish this? Thanks for all the help and feedback in advance! TD
  9. Anyone know how to access the information circled in the photo?
  10. Dear developers and creators of the language, please explain to me why when pressing the combination Crtl + Shift + C from the 5th or the 10th time "sticks / sinks" Ctrl or Shift? And then you need to press Ctrl or Shift again to reset their triggering. I only need to use hot keys like in the example! The code is a small example. Its essence is that when a user in the editor selects any number and presses a combination, then it increases by 1. Dim $x HotKeySet("+^c","Calc") While 1 Sleep(10000) WEnd Func Calc() Send("^c") Sleep(50) $x=ClipGet()+1 ClipPut($x) Send("^v") EndFunc I thought that in my program some kind of glitch was searching for a reason for a long time. And it turned out that apparently somehow the work of some functions used in the example is not compatible. Tell me, please, what is the problem?
  11. If you observe in below code. Func _WinWaitActivate($title,$text,$timeout=$time_out) Logging("Waiting for "&$title&":"&$text) $dHandle = WinWait($title,$text,$timeout) if not ($dHandle = 0) then If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) Else Logging("Timeout occured while waiting for the window...") Exit EndIf EndFunc WinActivate("Untitled - Notepad") $p = "Notallowed1!!" Send("{ENTER}{ENTER}{ENTER}{ENTER}"& $p &"{ENTER}create{SPACE}database{SPACE}"& $p &";{ENTER}") In the notepad if you observe, ! is missing in the text got. Is there way to get that also printed.
  12. Hello everyone, I have a script that is automating a piece of sluggish software. I want to automate it with a bit of caution and I am not sure the best way to do it. ControlSend works great most of the time. If I have it enter 10 into a text box every once in a while it will enter 1 or 11 and then hit enter. To overcome this I use MouseClick to select the text I just entered and then see if it matches the string it was supposed to put in before it hits enter. This seems to work but what I love about ControlSend is there is less room for human interaction messing it up. Yes I could block input but I prefer not to do that (permissions). Is there a better way of doing this? Any Help would be much appreciated. Anyway here is the snippet of the script in question: Func KVSend () WinActivate ( "Window", "" ) Local $WindowPos = WinGetPos("Window", "") If $kV < 30 Then WinActivate ( "Window", "" ) ControlClick ("Window", "", 1001) ;Click in Accel Voltage box Sleep (100) ControlSend ("Window", "", 1001, $kV) ; \ kV Sleep (100) MouseMove($WindowPos[0]+130,$WindowPos[1]+75,1) MouseClick($MOUSE_CLICK_LEFT) MouseClick($MOUSE_CLICK_LEFT) Send ("^c") Local $clip = ClipGet () If $clip = $kV Then ControlSend ("Window", "", 1001, "{ENTER}") ;Hit ENTER if value is correct Sleep (100) ControlClick ("Window", "", 1518) ;Lens Clear Else Send ("{BACKSPACE}") KVSend() ; If value is incorrect try again EndIf EndIf
  13. Hi all, I need to start a script that include: - admin privileges - multiple cmd commands - no bat, no exe, no tmp files created anywhere (especially in the user temp folder) In a bat file it would be simple, but users shouldn't see what commands I'm sending. Example of the script: echo off cls echo. echo I AM A TOOL echo. echo NOTE: echo - note 1 echo - note 2 echo - etc set USER1=0 set COMPUTER1=0 if /i %username% equ user.user ( set USER1=1 set COMPUTER1=1 ) if /i %username% equ another.user set USER1=1 if /i %computername% equ notebook set COMPUTER1=1 if %USER1% EQU 1 ( if %COMPUTER1% EQU 1 ( reg delete "HKLM\SOFTWARE\blablabla" /f ) else ( echo Computer not authorized. Contact assistance.) ) else ( echo User not authorized. Contact assistance.) echo. pause exit With the send("") is a disaster. I'm a noob here, so what can I do? EDIT: OR ELSE I explain the situation and what I need, so if there is a simple solution I can use that. SITUATION: our domain users have Users rights on the machine. Some of them need administrator rights. We create a local user with administrator rights, so that the users must insert username and password when asked to run something with administrator rights. We have an internal domain group policy that blocks EXE, BAT, COM, TMP files from the user local temp directory, for a security reason (malware). That also blocks most software installation. But some users are often out of office, away from workplace and in another country, they need a complete control on their computers. WHAT I NEED: I need to check the username and the computer name. If the username is the one with local administrator rights and the computer name is a computer that is qualified to temporary remove the policy, then I need to execute a REG DELETE command with administrator rights. I hope I explained myself. Thank you very much.
  14. This is what I'm trying to do: In Firefox, if you hold down CTRL + C for about 200ms, then press CTRL + T. This is my code: While WinActive(" - Mozilla Firefox") If _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL) Then $timer = TimerInit() While _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL) Sleep(10) $diff = TimerDiff($timer) If $diff > 200 Then Send("^{T}") While _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL) Sleep(10) WEnd EndIf WEnd EndIf WEnd The problem is that the CTRL key gets stuck down after Send("^{T}"). I found this, but what I understand that happens when I release, and that is not what I want. The "General unstuck method" did nothing.
  15. Hello guys. I have got this script $iPid = run("Powershell Get-ADUser "&$UserNameReaded&" -Properties * | select -Expand EmailAddress" , @WindowsDir , @SW_HIDE , 0x2) $MailUser = "" While 1 $MailUser &= StdoutRead($iPID) If @error Then ExitLoop EndIf WEnd GUICtrlSetData ($Label015, ""&$MailUser) If $MailUser = "" Then GUICtrlSetData ($Label017 , "N/A"&$MailUser) Everything is working fine i got correct value For my account the value is for exemple : J.Personnal@Enterprise.com in the $Label017 the value is correct i have still J.Personnal@Enterprise.com If i use : Send (""&$MailUser) i have now : J.Personnalnterprise.com Is there a way to correct this ?
  16. hello im trying to automate random greetings word from .txt file and write/send some strings but it gives me error please be gentle to me im kinda newbie thank you $File = FileReadToArray("words.txt") $RandomWords = $File[Random(0, UBound($File) - 1, 1)] send ("$RandomWords") sleep (1000) send ("{enter}")
  17. Hey Guys - I am trying to write a very simple script that just types a value into ONE field and presses and next That's it! Here is what I am trying to do: I have a software product that used Installshield to package it - I wrote a response file per installshield directions / for the software and it automated almost everything except one window... sadly the company that makes the software doesn't want to help, installshield won't help since I don't have a license . So I am trying to write and autoit script to fill in the one window that doesn't get recorded in the response file to finish the installation My write activated the window but when I follow it with a send() it doesn't work here is what I have WinActivate("Server Information") Send("xx-xxx-xx") Send("!n") Send("{SPACE}") any ideas ?
  18. Hi All, Could someone please PLEASE tell me what I'm doing wrong here? I feel like I'm close to figuring this out, I think I've identified what is causing the issue. Whenever I try to use the hotkey CTRL+SHIFT+T (or any other letter other than T for that matter) to paste the text to notepad, my CTRL and SHIFT keys are held down *IF* I release them *WHILE* the raw text is being written. It seems to be that if I release the CTRL+SHIFT keys: Before the Send Raw text starts to write to the screen: the CTRL and SHIFT keys ARE NOT held down, this is good During the Send Raw text being written to the screen: the CTRL and SHIFT keys ARE held down perpetually until I physically press them on the keyboard, this is bad After the Send Raw text has written all text to the screen: the CTRL and SHIFT keys ARE NOT held down, this is good This is also the case if I were to use the Windows Key as the hot key instead of the CTRL+SHIFT, I would need to tap the WIN key physically on my keyboard if I released it while the raw tet was being sent to the screen (eg, WIN+T). This issue also happens no matter which program I try to write the text to. Here's some example code: (I've put a bunch of "a's" in there to give enough time to test releasing the CTRL+SHIFT before/during/after the writing of them) HotKeySet("^+t", "WriteTxt") Func WriteTxt() WinWaitActive("Untitled - Notepad") $var = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" send($var, 1) EndFunc While 1 Sleep(500) WEnd Thanks guys!
  19. How can I run this command:      Send( 'C:\xampp\htdocs\myApp\BuildDVD.exe ..\..\projects\dvdrom\' & $sFileName & '\project.xml ..\..\projects\' & $sFileName & '\video') in a Shell Execute? I can run ShellExecute('C:\xampp\htdocs\myApp\BuildDVD.exe') but how to I add the rest of the command?
  20. #include <Misc.au3> While 1 If _IsPressed(59) Then Send("{B}") MouseDown("left") Else Send("{B}") MouseUp("left") EndIf WEnd I want the script to do this: - if I press "Y", send "B" once and hold left click down until i release "Y". - if I take my hands off of "Y" key, then send "B" once again and release left click. but the script I made has problems. when I run the script, it starts sending "B" repeatedly, and my left click won't work. I'm not smart enough to figure out what the problem is... please help me! sorry for bad English.
  21. Hello, I've made a GUI that can send multiple commands. The way I'm doing this at the moment is whit "send" commands. also first go to the right directory where the "to be used" program sits And send from there the commandline argument whit parameters. Here is a example of the way I'm using it now: Func restart_app($xip) Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Sleep(50) send("cd\" & "{ENTER}") Sleep(50) send("cd Tools" & "{ENTER}") Sleep(50) send("pskill \\" & $$xip & " -u username -p pass /accepteula app.exe" & "{ENTER}") EndFunc This way is working and I got no problems whit this. Also I realy think there is a mush better and way to do the same and maybe a little bit less error free (even better if this is hidden for the user :)) On this forum I could not find anything related to this subject (or I was not looking in the right direction) and hope somebody knows a better way Is there a way where u can send the arguments and parameters directly in 1 line to the commandpromt whitout using "send" to commandprompt? Thanks in advanced ps: I also tried : ShellExecute("pskill", "\\" & $xip & " -u username -p pass /accepteula app.exe") But din't work
  22. I have a script that changes the path to a file inside a program, the program itself is a pain in the @## I have no idea what language was coded with but the autoit windows info doesn't even recognize 90% of the gui. Anyway I need to send the new path which is inside the local app folder, I'am using a variable to hold it. but the User folder has the "#" character in the name and for some reason autoit won't send it, it just stops right before the "#" and doesn't send the rest of the path either. it doesn't return any error it just stops sending, the rest of the script is still executed. I'm using the Send() command to send the keys. Here's what I have: $dbPath = @UserProfileDir & '\AppData\Local\database\db.mdb' Run("Notepad.exe") WinWait("Untitled - Notepad") WinActivate("Untitled - Notepad") Send($dbPath) Now in my case @UserProfileDir is called Tech #1 so what I'm expecting Send() to type is C:\Users\Tech #1\AppData\Local\database\db.mdb But what I'm actually getting is just C:\Users\Tech notice there's the space after the "h", so it is stopping exactly before the "#" Now you might say why I need to use a var instead of just sending the actual string path, well I don't want to do a separate script for all the computers and guess what, they all have the "#" in their user names, yes Tech #2, Tech #3, Tech #4, Front #1, Front #2, Shipping #1... and so on. BTW on a side note, I noticed the autoit macros page shows the @LocalAppDataDir as a viable macro but it's not working for me, it return "unknown macro", I had to use @UserProfileDir and and the \AppData\Local, because the @AppDataDir takes me to Roaming anyway. While I was writing that last paragraph, I said to my self, yeah why not just copy and paste the script and compile as many as I need but use plain text instead of a variable, so I went back and did just Run("Notepad.exe") WinWait("Untitled - Notepad") WinActivate("Untitled - Notepad") Send("C:\Users\Tech #1\AppData\Local\database\db.mdb") Guess what!!!, yeah you guessed it, it did the same thing, it stopped right before the "#". I know most will be thinking, nah he's crazy why would that happen, go ahead and try for yourself, I'll wait... (because I tried in 3 different computers). Ok so you are back, did it work for you? can you explain why it's not working for me, or it didn't work for you as well and you are as clueless as me? And while I was writing all this my brain was working on the background and I just had an idea to work around it, I'll be right back... $dbPath = @UserProfileDir & '\AppData\Local\DiGital WorkShop\POS Panic\PM229.mdb' Run("Notepad.exe") WinWait("Untitled - Notepad") WinActivate("Untitled - Notepad") ClipPut($dbPath) Send("{CTRLDOWN}v{CTRLUP}") Ok so this actually works for me and I can finally breath, but I'm still annoyed by the fact that autoit won't Send("#1") or Send("#2"), yes I actually tried just sending that and nothing, and I just realize what is doing, (this lecture will annoy most people lol), by sending #1, #2, #3 ans so on it is activating windows in the same order they are pinned in the taskbar, I had autoit first, then chrome, the my mail app, so every time I use Send("#1") activates autoit, which I didn't noticed at all because well I was using autoit, but then when I Send("#2") and it brought chrome to the front, then Send("#3") and activated my mail app (which btw was minimized). What in the world is happening some please explain me this behavior and please tell me how would you workaround the issue. Thanks.
  23. Hi All, I'm wanting to learn how to use ControlSend or ControlClick to be able to click a button when prompted, part of the problem is the button text changes. The button I want to click displays "NO (XX)" where XX is a countdown each second from 90 - image attached. I've not done Control based code before, so the below code may be wrong lol, but this is what I've got so far: While 1 If WinExists("System", "reboot") Then Local $hWnd = WinWait("System", "reboot", 5) Local $iPID = WinGetProcess($hWnd) ControlClick($hWnd, "", "[CLASS:Button; Text: NO"] ;ProcessClose($iPID) EndIf Sleep(10000) WEnd Thanks!
  24. I am having trouble getting the send command with one of the defined macros. I need to send to the active window a function with parameters. Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("RUN(""@IPAddress1"", port_number, ""conf_option"")") What I am looking for is something like this to be sent to the active window RUN("", 52535, "filename.conf") getting the @IPAddress in quotes seems to screw up the send command syntax. Any help?
  25. Hello everyone. I'm wondering if its possible: I want to try create a simple autoit script that will 1) first he must connect to some IP in internet port 80 2) then he must listen for incoming connections from other IP'S ports 8000 - 8200 [in total over 200 connections] 3) that script must send all recieved data from that [IP in internet port 80 ] to [other IP'S ports 8000 - 8200] is that very hard to do ? Any suggestions or maybe some similar examples that can help me to do this ? all those 200 connections must receive data at the same time at once is it possible to do so ?
  • Create New...