Jump to content

Search the Community

Showing results for tags 'send'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. 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
  2. I am Using Windows 10 on 32 Operating System On typing I use Alt + Shift so to enable toggle typing in English and Greek i find it impossible to achieve the same function using autoit3 using Send ("!+") I would appreciate any help in solving this problem Also I would appreciate any help in switching to Greek language using the CAPS Key Thank you
  3. Hi. I am trying to automate a software called "LabelImg" (https://pypi.org/project/labelImg/). My autoit-script is started once I selected a folder with images within LabelImg. Pressing the button "Next Image" or pressing the shortcut "d" (https://github.com/tzutalin/labelImg#Hotkeys) jumps to the next image in the selected folder. This shall happen once per second. #include <Misc.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Opt("WinTitleMatchMode", 1) Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("1B", $hDLL) Then ExitLoop Else Local $temp = WinActivate("labelImg") ConsoleWrite($temp & @CRLF) If WinActivate("labelImg") Then ConsoleWrite("All Set!" & @CRLF) EndIf ;Send("d") Local $temp = MouseClick($MOUSE_CLICK_RIGHT, 50, 200) If $temp <> 1 Then MsgBox(1, "$temp", $temp) ExitLoop EndIf Sleep(1000) EndIf WEnd DllClose($hDLL) So the Send ("d")-command and the MouseClick are alternative methods to jump to the next image. Both fail. Both ConsoleWrite's deliver proper feedback (I continiously get the handle and "All set" ). Could you tell me what I'm doing wrong? Thank you.
  4. Version 1.0.6

    372 downloads

    AT Command UDF - for control AT Modems, send SMS, get SMS Changelog: #cs 1.0.0 2020/10/03 . First version - Danyfirex + mLipok 1.0.1 2020/10/04 . Added - Function - _ATCmd_IsPINReady - Danyfirex . Added - Function - _ATCmd_IsPINRequired - Danyfirex . Added - Function - _ATCmd_IsSIMInserted - Danyfirex . Added - Function - _ATCmd_IsSenderSupported - Danyfirex . Added - Function - _ATCmd_OnPINReques - Danyfirex . Added - Function - _ATCmd_SMS_ListTextMessages - Danyfirex . Added - Function - _ATCmd_SetPIN - Danyfirex . Added - Function - __ATCmd_GetPINCounter - Danyfirex - Added - ENUM - $ATCmd_ERR_PIN - Danyfirex - Added - ENUM - $ATCmd_ERR_SIM - Danyfirex . Changed - __ATCmd_ComposePDU() - using _ATCmd_UseUCS2() internally instead parameter - Danyfirex . Suplemented - #CURRENT# - Danyfirex . . 1.0.2 2020/10/05 . Added - ENUM - $ATCmd_MSGLIST_* - mLipok . Added - ENUM - $ATCmd_STATUS__* - mLipok - Added - ENUM - $ATCmd_ERR_PARAMETER - mLipok . Added - _ATCmd_UsePDU() - parameter validation - mLipok . Added - _ATCmd_UseUCS2() - parameter validation - mLipok . Added - more error logs . Changed - MagicNumber replaced with Standard UDF constants - mLipok . Small refactoring - mLipok . . 1.0.3 2020/10/05 . CleanUp - Danyfirex . . 1.0.4 2020/10/05 . Small refactoring - Danyfirex . CleanUp - Danyfirex . . 1.0.5 2020/10/23 . _ATCmd_FullLoging - mLipok . _ATCmd_CMEESetup() ... @WIP - mLipok . $ATCMD_STATUS_11_SUBSCRIBERNUMBER - mLipok . . 1.0.6 2020/10/25 . __ATCmd_CMSErrorParser() - mLipok . . @LAST https://www.nowsms.com/gsm-modem-cms-error-code-list https://m2msupport.net/m2msupport/at-command-to-enable-error-codes/ https://www.micromedia-int.com/en/gsm-2/73-gsm/669-cme-error-gsm-equipment-related-errors https://assets.nagios.com/downloads/nagiosxi/docs/ATCommandReference.pdf https://www.maritex.com.pl/product/attachment/40451/15b4db6d1a10eada42700f7293353776 https://www.multitech.net/developer/wp-content/uploads/2010/10/S000463C.pdf https://www.telit.com/wp-content/uploads/2017/09/Telit_AT_Commands_Reference_Guide_r24_B.pdf https://docs.rs-online.com/5931/0900766b80bec52c.pdf PDU Format / Testers / Encoders / decoders https://m2msupport.net/m2msupport/sms-at-commands/#pduformat http://smstools3.kekekasvi.com/topic.php?id=288 #ce Saludos
  5. Hi Team, I am trying to send credentials via autoit on a web app launched via IE. I am passing the credentials into variables and trying to send them send("$username") but username field isn't getting populated. But the password field, I can send the credential, also when I try ieformsetvalue and set the username wrt username field fetched, it's getting send but my login button remains greyed out. Can angularjs keydown function interfere in the autoit send process and not allow the credentials passed if it's not typed out? This is a general question to understand if javascript or angular js etc could detect if the credentials are automated, then it might not detect it as a keydown?
  6. Hello, still learning and trying to understand AutoIT but having problem in filling my PDF file. So my code looks like similar to this: Global $1 = "text text 44444444" Global $2 = "texting2 texting2" Global $3 = "newtext3 next3" ShellExecute ("C:\Users\XXX\Desktop\myPDF.pdf") WinWaitActive("MyPDF.pdf - Adobe Acrobat Reader DC") Send ("{TAB}") ClipPut($1) Send ("^v") Send ("{TAB 3}") ClipPut($2) Send("^v") Send ("{TAB}") ClipPut($3) Send("^v") So its fill my PDF form, the first field looks good, the code add the text text 4444, then second should be $2 with texting2 texting2 but for some reason the code uses for second and third field after TAB only variable $3. So, I receive in $2 and $3 for some reason same newtext3 next3 in both, why its skipping the variable $2? Maybe there also much better solution for instant text? Because Send writes with delay by letters which I don't like. Thanks!
  7. My AutoIt script works fine, for the most part, however, if it goes idle for roughly 30 minutes, it will won't be able to send data to a 3rd party application window titled, "Case #". The problem lies within the function "SendFusion", it's able to see the handle for the "WinActivate" and "WinWaitActivate" (I've also tried putting in 10 seconds in the WinWaitActivate as well, doesn't work). However, if we have been idle, it will always fail to send data afterward. On what I've tried so far: "Send" function with the data and a {ENTER} i.e. Send($CaseTxt & "{ENTER}"), this won't even hit the enter key ControlSetText, tried passing the handle from WinActivate, using the title "Case #" that was copied directly from the Autoit Window Info, hard coding the title, Using CLASS:WindowsForms10... always returns a 0 ControlCommand (same as above) always returns a 0 ControlGetFocus always returns a 0 ControlFocus, always returns a 0 Creating a new and simple Au3 script that just sends data to "Case #", also fails NOTE: If I close the Au3 script and just scan the data directly into the "Case #" or even type it, it works fine with no issues. I'm confused as to why it would not work after a long idle period? Below are the essential parts of the script, I can provide the entire thing if needed. Any suggestions would be greatly appreciated! #include <AutoItConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Process.au3> #include <Misc.au3> #include <IE.au3> ;--------------------------------------------------------------- ; Only one instance can run ;--------------------------------------------------------------- If _Singleton("gross.exe", 1) = 0 Then MsgBox($MB_SYSTEMMODAL, "Warning", "Gross.exe is already running. Please exit the existing version first (check the icons in the lower right corner of your screen) before running it again.") Exit EndIf ;--------------------------------------------------------------- ; AutoIt Options ;--------------------------------------------------------------- Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt("WinWaitDelay", 0) ; Alters how long a script should briefly pause after a successful window-related operation. Time in milliseconds to pause (default=250). Opt("WinTextMatchMode", 1) ; Alters the method that is used to match window text during search operations. 2 = Quick mode Opt("SendKeyDelay", 0) ; Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). if ($fusionWindowTitle="NONE" or $fusionCaseNumWinTitle="NONE" or $appWindowTitle="NONE" or $winActivateTimeout="NONE" or $winCloseTimeout="NONE" or $winWaitTimeout="NONE" or $pdfViewerWidth="NONE" or $pdfViewerHeight="NONE" or $pdfViewerLeft="NONE" or $pdfViewerWindowName="NONE" or $pdfViewerExeName="NONE" or $pdfUrl="NONE" or $pdfDownloadCommand="NONE") Then Msgbox(0,"ERROR", "gross.ini is missing or does not contain all settings. Please contact Help Desk with this information") Exit -1 EndIf ;--------------------------------------------------------------- ; application settings/constants ;--------------------------------------------------------------- Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") Global Const $[VARIABLE] = IniRead("gross.ini", "default", "[TitleOfVariable]", "NONE") ;--------------------------------------------------------------- ; create the main window ;--------------------------------------------------------------- Local $mainWindow = GUICreate($appWindowTitle, 380, 190) ; create the main GUI window GUISetOnEvent($GUI_EVENT_CLOSE, "handleCloseClick") ; when the click the windows close button call handleCloseClick() WinSetOnTop($appWindowTitle, '', 1) ; Sets main GUI always on top ;--------------------------------------------------------------- ; create the controls on the main window ;--------------------------------------------------------------- Local $okButton = GUICtrlCreateButton("OK", 160, 160, 54,24) ; create OK button GUICtrlSetOnEvent($okButton, "validateInput") ; when they click ok, call handleInputProcessRequest() GUICtrlCreateLabel("Scan Input", 10, 10) ; create a label Global $inputScan = GUICtrlCreateInput("", 10,134,358) ; create the input scan box GUICtrlSetOnEvent($inputScan, "validateInput") ; when they press enter in the scan input box, call handleInputProcessRequest() GUICtrlSetState($inputScan,$GUI_FOCUS) ; automatically sets focus on the input field GUISetState(@SW_SHOW) ; main GUI loop that runs at all times ;--------------------------------------------------------------- While 1 ;---------------------------------------------------------- ; If sumatraPDF active, resets focus back to GUI ;---------------------------------------------------------- If WinActive($pdfViewerWindowName) Then consoleWrite('While Loop sumatraPDF was active' & @CRLF) setMainWindow() ;---------------------------------------------------------- ; After data sent to ProTracker, check for mismatch ; save button to trigger the event handler when clicked ;---------------------------------------------------------- ElseIf WinActive($proTrackerWindowTitle) Then $ie = _IEAttach("ProTracker") $mismatchButton = _IEGetObjByName($ie, $proTrackerMisMatchButtonId) $oEvent = ObjEvent($mismatchButton, "mismatchButton_") If @error Then setMainWindow() ;--------------------------------------------------------------------- ; If Fusion is prompting for the case #, focus back to main GUI input ; If second GUI 'Unknown' detect do nothing ;--------------------------------------------------------------------- ElseIf WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) and Not WinActive($mainWindow) and Not WinExists('Unknown Input') Then setMainWindow() EndIF ;--------------------------------------------------------------------- ; Checks if $processFlag = Done, if so, shows PDF viewer and clears ; processFlag for next iteration ;--------------------------------------------------------------------- IF WinExists($pdfViewerWindowName) and $processFlag == 'Done' Then WinSetState ($pdfViewerWindowName, '', @SW_SHOW) $processFlag = '' setMainWindow() EndIF Sleep(100) ; Sleep to reduce CPU usage WEnd Func handleInputProcessRequest($input) $processFlag = True Local $hTimer = TimerInit() consoleWrite('> handleInputProcessRequest: ' & @CRLF) Local $idInput = identifyInput($input) ; Select a proccess to run based on id input Select Case $idInput = "container" ; regex that captures only the case number $caseTxt = StringUpper(StringRegExpReplace($strippedInputData, '\??(\w*\d*-\d*|\d*).*$','$1')) If WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) Then sendProTracker(StringUpper($strippedInputData)) sendFusion($caseTxt) ; gets pdf for sumatraPDF in seperate script, since that function is the slowest Run("viewPDF.exe " & $caseTxt) ;getSumatraPDF($caseTxt) $lastCaseNum = $caseTxt Else ; Checks to make sure the previous "Container" case num is the same ; to the current Container case num, before sending to ProTracker If($lastCaseNum <> $caseTxt) Then ; If not the same case number send alert sound SoundPlay("error.wav") Else sendProTracker($strippedInputData) EndIf EndIf Case $idInput = "user" sendProTracker($strippedInputData) Case $idInput = "cassette" sendProTracker(StringUpper($strippedInputData)) Case $idInput = "unknown" selectUnknown() EndSelect Local $fDiff = TimerDiff($hTimer) $processFlag = 'Done' consoleWrite('> handleInputProcessRequest Completed Total time: ' & $fDiff & ' ' &@CRLF&@CRLF&@CRLF) EndFunc Func sendFusion($caseTxt)     Local $hTimer = TimerInit()     consoleWrite('+ sendFusion initiated: ' & $caseTxt & @CRLF)     If $caseTxt = "" Then         MsgBox(0, "Error", "Not a valid case number")     Else         ;$fusionCaseNumWinTitle = "Case #"         $retVal1 = WinActivate($fusionCaseNumWinTitle, "")         consoleWrite("ReturnValue WinActivate " & $retVal1 & @CRLF)         $retVal2 = WinWaitActive($fusionCaseNumWinTitle,"",$winActivateTimeout)         consoleWrite("ReturnValue WinWaitActive: " & $retVal2 & @CRLF)         $retVal3 = ControlSetText($fusionCaseNumWinTitle, "", "", $caseTxt)         ;$retVal3 = ControlCommand($fusionCaseNumWinTitle, "", "", "EditPaste", $caseTxt)         consoleWrite("ReturnValue ControlSetText: " & $retVal3 & @CRLF)         ;Send($caseTxt & "{ENTER}")         WinWaitClose($fusionCaseNumWinTitle, "", $winCloseTimeout)         consoleWrite('+ sendFusion WinWaitClose: ' & @CRLF)     EndIf     Local $fDiff = TimerDiff($hTimer)     ConsoleWrite('+ sendFusion Completed Total time:' & $fDiff & ' ' & @CRLF) EndFunc Console logs from the SciTLE Window (x86) Info matches the correct handle for the WinActivate and WinWaitActivate Window Control (x86) Info, I've tried the CLASS, the ID, also I just noticed that the "handle" in "Control" and "Window" appear to be different as well. So far the only work-around is to close down the 3rd party application and the AutoIt script, re-open them and it works all completely fine. But this is a pain for the end-user since it's all touch screen and it slows down their workflow, which they can be extremely sensitive about.
  8. hello autoit group please i've a question i had make a function that put some thing into the clipBoard and paste it using the send function e.g ClipPut("hello") send("^v") when the keyboard is english all things work fine but when the keyboard is arabic the send command write the ltr v insted of the text in clipboard i was tryed to use send("{ctrldown}v{ctrlUp}") but the same please can any one help me
  9. 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.
  10. 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!
  11. 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?
  12. 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)
  13. 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
  14. 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.
  15. 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
  16. Anyone know how to access the information circled in the photo?
  17. 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?
  18. 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.
  19. 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
  20. 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.
  21. 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.
  22. 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 ?
  23. 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}")
  24. 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 ?
  25. 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!
×
×
  • Create New...