Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. woudl this program have the ability to search for multple files using a set oif searches? i.e. *filename1234.txt *filename1235.txt *filename1247.txt *filename1248.txt *filename2240.txt find all 5 of theses files then give you an option to copy them to another folder?
  3. Today
  4. Is there a way to show symbols in the rich edit control. In this case I'd like to create a richedit control that shows tabs and spaces: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiRichEdit.au3> Example() Func Example() Local $hGUI, $btnRemoveTabs, $editBox $hGUI = GUICreate("Remove Tabs", 1000, 800) $editBox = _GUICtrlRichEdit_Create($hGUI,"", 10, 10, 980, 700) _GUICtrlRichEdit_SetFont($editBox, 12) GUICtrlSetData(-1, "") $btnRemoveTabs = GUICtrlCreateButton("Remove Tabs & CRLFs", 400, 730, 200, 30) GUICtrlSetState(-1, $GUI_FOCUS) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btnRemoveTabs Local $sInput = GUICtrlRead($editBox) RemoveTabs($sInput) EndSwitch WEnd GUIDelete() EndFunc Func RemoveTabs($sInput) Local $sOutput $sOutput = StringReplace($sInput, @TAB, "") ClipPut($sOutput) SplashTextOn("Done", "Tabs removed and saved to clipboard!", 300, 50, -1, -1, 3) Sleep(1000) SplashOff() Return $sOutput EndFunc
  5. I am writing a script that needs to activate then move a Virtual Machine (using Hyper-V) window. The WinActivate function works fine. The window in question is brought to focus when that function is executed. Then I try to use WinMove to move the window. Even though the $success variable returns the $hWnd of the window (I would expect a zero if it didn't move the window), the window doesn't move. Then I try to use WinSetState to maximize the window without success. Same as with WinMove, $success returns the $hWnd of the window, not 0 and the window doesn't maximize. If I change the code to activate a non VM window it works fine and does everything in the script. Any ideas why the VM window won't move or resize via Autoit? Grab Codes Snippt.au3
  6. New Version -- v0.1.0 ** Added ** Spell Checker now can mark lines with misspelled words using a Margin marker also. Single Word check now will check the currently selected word. Script check now will be restrained to a selected portion if a selection exists. ClearSpChk function will now clear only a selection if one exists. ClearSpChk function now also clears the new Margin Markers also. Selected words that are single word spell checked can also be replaced using the drop down. ** Fixed ** Some apostrophied words not being correctly selected, such as "I'll". Some markings incorrectly included as part of the word at the beginning or end, such as dashes, quotations etc. Two if blocks in the program were incorrectly testing for nill, instead of nil. ** Changed ** Rewrote the word recognition method to work better and quicker. Seconds read out at end of Script is now maximum 4 characters long. Words to spell check are now directly written to the file, instead of to a table and then to a file, saving several milliseconds.
  7. I would download the portable version of AutoIt and SciTE. Then with the magic of ... ( I guess magic don't exist ). I would write a script that sets whatever I want. Edit: Couldn't see the picture hence my answer
  8. Hello, thanks for the response. I could see the registry key to select default option for .au3 files. But in 64bit machine, I get this below option to select native x64 or x86. How to select between these two options when installing silently? And how do we know which option is installed in the machine? Also, there is option to select required components in UI mode. How to select these components in Silent installation? Any switch to pass while installing?
  9. Yesterday
  10. inspired by AutoIt Help v3.3.16.1 with external CSS loading AutoItHelp.7z
  11. Ow, thanks for that. I am looking forward to check that UDFs. Have not been around much lately. I have to start learning RegEx proper way but I like also what you said about JSON UDFs...
  12. The string appears to be a JSON string. Have you already tried one of the corresponding JSON UDFs? This should be easier to understand and more stable than using RegEx.
  13. Hi Nine and thanks for trying to help. This version of a solution of yours leave ", "like_count" and , "author_id" after every line. I am very bad at regex so i dont know why but would like to see if you can correct it because your solution looks much more clear to me.
  14. Global $InputDatab = StringRegExp($InputDataa, '(?<="text": )(.+?)(?|, "like_count"|, "author_id")', 3) Try this.
  15. Hi sorry for bumping an old post but again i have a problem because site code changed. Everything worked fine but now there is a new line of code which unable this regex to work. Instead of "author_id" as closure now there is sometimes "like_count" instead of author_id which is still there but after much more code I dont need to extract. I did try to use delimiter in RegEx but I guess regex is not easy for me... Can someone just give me a suggestion how to make a regex which will say: Get text from here to (here or here). I did try to put it like this: Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"author_id\|like_count\")', 3) ...but it didnt work. Line instead of this was taking data from "text:" to "timestamp" Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"timestamp\")', 3) Here is an example of text which is in .info.json: So, now there are two lines which can be a closure for getting text: ', "like_count":' and ', "author_id":' How can I add in RegEx code that would do what i want? I did try it on my own with examples I found online but it does not work... Again much thanks in advance for this. Sorry, I just tried a bit more and solved a problem. Correct line is: Global $InputDatab = StringRegExp($InputDataa, '(?<=\"text\": \").*?(?=\", \"author_id|\", "like_count\")', 3) Thanks, sorry!
  16. @baselz, No sure why you quote my post? I gave you the reason why this must be failing, and you didn't respond at all to it. Try reading the answer again and in case you do not understand simply ask. PS: My comment isn't about the validity of the json, but the validity of the command you have formed. Cut and Paste the full command into a CMD window and check if it works.
  17. @baselz have you tried using: ?
  18. Again. If it runs well from the command line, it will do the same from a function in AutoIt but to believe that the failure is due to AutoIt is wrong. Humor me and run it at the command prompt. Basic troubleshooting.
  19. I run curl command using this function Local $result = Run(@ComSpec & " /c " & $curlCommand, "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($result) the Json is valid
  20. Have you checked what the contents of $curlCommand is and did you think it was valid? This runable version of your snipped: ; Construct JSON data $exitStatus = 0 $pluginOutput = "x" Local $jsonData = '{"exit_status": ' & $exitStatus & ', "plugin_output": "' & $pluginOutput & '"}' ; Send CURL command Local $curlCommand = 'curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "' & $jsonData & '" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check"' ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $curlCommand = ' & $curlCommand & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console give this as output: @@ Debug(8) : $curlCommand = curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "{"exit_status": 0, "plugin_output": "x"}" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check" Doubt that this part is valid: --data "{"exit_status": 0, "plugin_output": "x"}"
  21. If curl runs from command line, it'll run from AutoIt. That character has nothing to do with AutoIt.
  22. Hi, I'm failing to send Curl post command using AutoIT, basically I believe that the reason is having '!' special character in URL I would be glad for help ; Construct JSON data Local $jsonData = '{"exit_status": ' & $exitStatus & ', "plugin_output": "' & $pluginOutput & '"}' ; Send CURL command Local $curlCommand = 'curl -X POST -k -H "Content-type: application/json" -H "Accept: application/json" --data "' & $jsonData & '" "https://<URL>/v1/actions/process-check-result?service=.com!passive.setEnv_check"'
  23. try also: https://github.com/mlipok/Au3WebDriver-testing
  24. added to: https://www.autoitscript.com/wiki/WebDriver#References
  25. It is a small change not a bunch of changes, so I decide to submit PR without any issue
  26. https://github.com/Danp2/au3WebDriver/pull/517 Finally, I had the need to make an appropriate change for an identical task. ps. I have only just migrated this task/project from MOZREPL, so I have only now proposed an appropriate change.
  1. Load more activity
×
×
  • Create New...