This script used to work on an older version of AutoIT. Currently I am running AutoIT v126.96.36.199 and it's failing.
Func PublicIP() ;Post public facing IP address Local $url = 'https://www.google.com/search?client=opera&q=what+is+my+ip&sourceid=opera&ie=UTF-8&oe=UTF-8' Local $getIPaddress = BinaryToString(InetRead($url)) Local $sStart = 'clamp:2">' Local $sEnd = '</div>' Local $ipaddress = _StringBetween($getIPaddress, $sStart, $sEnd For $i In $ipaddress MsgBox(0, 'External IP', "Your public IP address is " & $i) Next EndFunc ;==>PublicIP The console output shows:
"C:\Users\user\Documents\AutoIT\Scripts\WSI Tools.au3" (197) : ==> Variable must be of type "Object".: For $i In $ipaddress For $i In $ipaddress^ ERROR ->14:12:16 AutoIt3.exe ended.rc:1 +>14:12:16 AutoIt3Wrapper Finished. >Exit code: 1 Time: 9.811
Hi, I have the following line in a text file 'input.txt'. I know the line number - say '6'. I wish to replace the text 'WWW' in the below line with a random number (I can generate that with random()).
WERIS WWWJP 3.83 8.330 1.000 1097.RAXX
The WWW is a 3 digit integer (could be any number between 0 to 999), I can use stringtrimleft and get the numerical value of WWW in this file
so, basically, I know the string to replace (ie; WWW stored in a variable), I know the line number to work on and the file location/name and the replacement variable (through random()). My requirement is to fill that 3 spaces with my random number (which Is a integer between 1 and 999)
please put ur suggestions
I'm trying to implement a Ctl-F popup box that looks something like the one that Notepad uses, but I'm not havine much luck. I intend to get it working, then beef up the popup's contents to add several checkboxes, buttons and radio boxes.
What my example code does is to use InputBox(), but that's not what I want.
Here is my test code:
#include <Array.au3> #include <GUIConstantsEx.au3> #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 Opt("GUICloseOnESC", 1) Opt("GUIOnEventMode", 1) Opt('MustDeclareVars', 1) OnAutoItExitRegister("ExitStageLeft") Opt("WinTitleMatchMode", -2) Global $hGUI _Main() Func _Main() $hGUI = GUICreate("Test ^F", 300, 200) setupSpecialKeysHandlers() GUISetOnEvent($GUI_EVENT_CLOSE, "Event_GUIClose") GUISetState() While (1) Sleep(157) WEnd EndFunc ;==>_Main Func handle_CTRL_F_key() Local $str $str = InputBox("Search", "Enter the string to search for:") ConsoleWrite("+++: $str ==>" & $str & "<==" & @CRLF) EndFunc ;==>handle_CTRL_F_key Func ExitStageLeft() Exit (99) EndFunc ;==>ExitStageLeft Func Event_GUIClose() Exit (1) EndFunc ;==>Event_GUIClose Func setupSpecialKeysHandlers() Local $ar, $parts, $key, $handler, $id Local $aAccelKeys ; Create a table of Special keys and their handlers $ar = StringSplit("", "") _ArrayAdd($ar, "^f - handle_CTRL_F_key ") ReDim $aAccelKeys[UBound($ar) - 1] ; Now, create $aAccelKeys array with the table data. ; For each entry, create a Dummy GUI and associate its ; ID with the special key. For $ndx = 1 To UBound($ar) - 1 $parts = StringSplit($ar[$ndx], "-", 2) $key = StringStripWS($parts, 8) $handler = StringStripWS($parts, 8) $id = GUICtrlCreateDummy() $aAccelKeys[$ndx - 1] = $key $aAccelKeys[$ndx - 1] = $id GUICtrlSetOnEvent($id, $handler) Next GUISetAccelerators($aAccelKeys) ; Setup the Special keys hooks EndFunc ;==>setupSpecialKeysHandlers
Good evening everyone
I am working with Word UDF ( thanks @water! ), and, especially, with the function _Word_DocFindReplace().
The replace does work everywhere in the document, but, it does not work in Headers or Footers.
Am I missing something or am I forced to use the code below?
I have already looked in the Help file ( about _Word_DocFindReplace() ), but there are no mentions about replace text in Headers/Footers.
Sub FindAndReplaceFirstStoryOfEachType() Dim rngStory As Range For Each rngStory In ActiveDocument.StoryRanges With rngStory.Find .Text = "find text" .Replacement.Text = "I'm found .Wrap = wdFindContinue .Execute Replace:=wdReplaceAll End With Next rngStory End Sub Thanks everyone in advance
Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here. However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore.
I'm not new to au3 but i'm not the most experienced with it's syntax/commands.
Anyways, I've looked over the big threads involving imagesearch.
Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post.
Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen!
Can't find a working copy so if anyone has one please send it my way lol.
I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working.