Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team
  4. i am navigate using _IENavigate. But sometime my url was changed, Ex. i want to navigate with "https://efps.gujarat.gov.in/webBillingApp/BillDetails/eFPSBill" but, sometime webBillingApp is webBillingApp1 or webBillingApp2 or webBillingApp(3 to 12) How can i navigate it ?
  5. You shouldn't declare Global variables within functions, but the main problem I can see is that $localExeVersion = "" it should be $localExeVersion = FileGetVersion (...). Would also use _VersionCompare to compare versions, example: ;IP Detect Update script ;© 2019 by Daniel Chavez ;Purpose: This updates iP Detect if there are changes #include <IE.au3> #include <INet.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> Global $g_bDebug = True ;~ Toggle debug mode Global $g_sUpdatePathIs = @ScriptDir & "\GetIPV2.exe" Global $g_sToBeReplacedPathIs = @ScriptDir & "\GetIP.exe" doVersionCheck() Func doVersionCheck($_bVersionCheck = False) Local $hDownload Local $sServerUpdateExe = "https://mydomain.us/win/GetIPV2.exe" Local $sServerVersionFile = "https://mydomain.us/win/IPDetectData/version.txt" Local $vLocalExeVersion = FileGetVersion($g_sToBeReplacedPathIs) Local $vRemoteExeVersion = _INetGetSource($sServerVersionFile) Local $iVersionCompare = _VersionCompare($vLocalExeVersion, $vRemoteExeVersion) Switch $iVersionCompare Case 0 If $g_bDebug Then MsgBox(4096, "Version Compare", "Both versions are equal") If $_bVersionCheck Then Return 0 Case 1 If $g_bDebug Then MsgBox(4096, "Version Compare", "Local Version is greater than remote version." & @CRLF & "Local Version := " & $vLocalExeVersion & @CRLF & "Remote Version := " & $vRemoteExeVersion) Case 2 If $_bVersionCheck Then Return 1 If $g_bDebug Then MsgBox(4096, "Version Compare", "Remote Version is greater than local version, let's update it") $hDownload = InetGet($sServerUpdateExe, $g_sUpdatePathIs, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) MsgBox(0,"Download Finished","download completed", 3) DownloadDeleteRename() EndSwitch EndFunc Func DownloadDeleteRename() Local $iRetryOrNot, $bUpdateFailed = False FileDelete($g_sToBeReplacedPathIs) FileMove($g_sUpdatePathIs, $g_sToBeReplacedPathIs, 1) If doVersionCheck(True) Then $iRetryOrNot = MsgBox(16 + 5,"Update error detected","Likely cause: Firewall/Antivirus prevented the download. ") If $iRetryOrNot = 4 Then doVersionCheck() Else Exit EndIf EndIf EndFunc
  6. #include <WinAPIGdiDC.au3> #include <SendMessage.au3> $hWnd = WinWait("Untitled - Paint") $hControl = ControlGetHandle($hWnd, "", "Afx:00007FF78D1E0000:81") Func Mousedrag($x1, $y1, $x2, $y2) Local $WM_MOUSEMOVE = 0x0200 Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 _SendMessage($hControl, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hControl, $WM_LBUTTONDOWN, $MK_LBUTTON, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hControl, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x2, $y2)) _SendMessage($hControl, $WM_LBUTTONUP, $MK_LBUTTON, _WinAPI_MakeLong($x2, $y2)) EndFunc ;==>Mousedrag Mousedrag(484, 554, 732, 554) ConsoleWrite($hWnd & @LF & $hControl & @LF) Coords relevant to the control
  7. Sorry for not understanding your question earlier. I started learning AutoIT today, so I didn't have anything specific in mind. I tested it on browser game where you had to get from point A to B and step on as many boxes as you can. I just wanted to make predefined path and see how the script goes thorugh the lvls. When you click too fast in chrome it takes only one input. With key down and up I partly solved this problem. It's working much faster. I could just write it in code with Send() as many times as it's needed to be repeated but that doesn't make sense. That's why I need a way to make a function that I described above. You said that Send() is unreliable but is there any better alternative?
  8. Good day, I am trying to write an update script to update my existing IP Detection program. The program is suppose to read the local version and compare it to a text file found on a web server. If the version's match (e.g., 2.0 from the text file, and 2.0 for the local version,) vno update would be needed. However, if the text file says 3.0, and the local program version is 2.0, download the update, delete the old exe, and replace it with the newer version 3.0 of the file. I have the following file, perhaps I forgot something in it? ip-detect-update.au3
  9. That is the point of my question, without more detail as to what you are trying to accomplish with your clicking keys, it is difficult to provide suggestions. See my signature for how to ask good questions on the forum; in essence, the more detail you can provide about the app you're working with, what you're trying to do, what triggers your script, etc., the better we can assist.
  10. @RuHor take a look at Melba's UDF, it was inspired by just what you're talking about; the small popups near the systray that apps use for notification:
  11. Yesterday
  12. According to the OleView image above, the object name should be "JustRemotePhone.RemotePhoneService.ApplicationFactory". What I usually look for when trying to figure out what the object name should be, is the ProgID or the VersionIndependentProgID if it has one. The following example appears to successfully create the application object for me. If you change "ApplicationFactory" back to just "Application" and run the example, you will see that it fails with an invalid class string error (as I think was stated earlier). #include <Constants.au3> example() Func example() Local $oComErr, $oApp $oComErr = ObjEvent("AutoIt.Error", "com_error_handler") $oApp = ObjCreate("JustRemotePhone.RemotePhoneService.ApplicationFactory") If @error Then Exit MsgBox($MB_ICONERROR, "ERROR", $oComErr.WinDescription) MsgBox($MB_ICONINFORMATION, "INFO", "Application object successfully created!") EndFunc Func com_error_handler($oError) Return EndFunc
  13. I have only worked with DFS a little bit, so I'm no expert. But I did a quick search and found dfsutil.exe might be useful and with that, the 'dfsutil property' command (with the 'state' subcommand) would most likely get you the information you need. You could use AutoIt to execute the program with parameters. I have no way of testing any of this right now, so I may be wrong. I hope this will help guide you.
  14. The help file specifies only four icons that are built into Windows. I do not think you can select any others.
  15. If you are running AutoIt from a zipped folder, then that's your problem. You need to extract all of the AutoIt files to a folder and run it from there. When you run something from a zipped folder, it only extracts the item you are running and all other files are still in the zipped folder. Therefore, the #include you referenced is not in the temp folder that your zip program created.
  16. Look at function ControlGetHandle()
  17. Hello, someone can help me with the code to create a notification that appears in this way, with the icon and those 3 text lines as the image that I have already attached, I have tried it using the function: TrayTip ("I'm a title", "I'm the message", 0, $ TIP_ICONASTERISK) But the text Autoit v3 Script appears and that text would like to change as the icon
  18. I tried to make a function that with 3 parameters would click any key X times with X delay between them. If there's more efficient way to do it then please tell me.
  19. @Vient What exactly are you trying to accomplish with your script? You are learning how unreliable Send can be; there is probably a better way to do what you're after.
  20. I have a problem with using Send() in my function. I want to create simple move function with 3 variables: - Direction - How many times the key will be pressed - How much timeout will be between each click I can't figure out how I'm supposed to merge string with a variable inside Send(). Tried different syntax few times but I run out of ideas. I also couldn't find a clue inside documentation of Send function.(not telling that there isn't). Here's how it looked in my last try to give you some insight what I have in mind. Thank you in advance for any advices.
  21. @mikell, thanks for your Regular Expression, i think you've decreased cpu usage with your approach
  22. @Nine Inhouse apps, I just need a way to predictably drag I tried using a mousescroll but its too imprecise as its like a fling rather than a drag @LarsJ Excuse my ignorance as I've only ever used titles I tried this but cant seem to get it to work #include <WinAPIGdiDC.au3> #include <SendMessage.au3> $hWnd = WinWait("[HANDLE:0x00130EA4]", "") Func Mousedrag($x1,$y1,$x2,$y2) Local $WM_MOUSEMOVE = 0x0200 Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON, _WinAPI_MakeLong($x1, $y1)) _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x2, $y2)) _SendMessage($hwnd, $WM_LBUTTONUP, $MK_LBUTTON, _WinAPI_MakeLong($x2, $y2)) EndFunc Mousedrag(484,554,732,554)
  23. I think the thread for the NET UDF is the best place to get more help. If they can't help then I don't know who else 😯
  24. Okay, let me try this again but this time with pictures... If I do a DriveMapGet, it returns DFSROOT which isn't helpful. I've attached what the drive looks like in Windows Explorer. Just shows the Drive with no mapping. Then, if I look at the properties. What I want is the mapping that is shown in the DFS tab of the properties. The "net use" also doesn't show my the actual drive mapping. How do I get the actual drive mapping for a DFS Drive? In short, I want to determine which server the drive is mapped to.
  25. Look at this my old topic about the same/similar problem: There are described workarounds ...
  1. Load more activity
×
×
  • Create New...