reviewing the forum, this thread is applicable:
I wanted to know if there is now a better way to do this?
In essence, I load a tab delimited txt file into an array (works well). I used tab, as some fields in the original csv contains commas.
However, I needed autoit to manipulate this array, and output it as a csv.
IF my array contains items with a comma, without double quotes around the field, then how best do I get a csv out of this?
My current workaround is to filewritefromarray tab delimited, then open it in excel and save as a csv. I will need to check this to see how the address fields behave that contain a comma.
Any thoughts would be appreciated.
How i can write data from txt to +3 Input?
In txt i have:
Michael XYZ, 21, Boston
Olex Marshal, 17, Boston
Alex XYZ, 19, Boston
And now i want load that data to input in autoit.
Name y.o city
[ Input1] [Input2] [Input3]
[ Input4] [Input5] [Input6]
[ Input7] [Input8] [Input9]
After load should be:
Name y.o city
[Michael XYZ]  [Boston]
[ Olex Marshal]  [Boston]
[ Alex XYZ]  [Boston]
FileOpen("Test.txt",0) $aas = GUICtrlSetData($Input1, FileReadLine("Test.txt",1)) FileClose("Test.txt") But its wrong. ofcourse its load all to input 1. So now how do you load this data directly into each input separately? The comma stop sign is here. Each line is a new person
Is it possible to get a variable on your For..Next loop?
Local $Lines1 = _FileCountLines(C:\temp\test.txt) Local $linesToCount2 = $Lines1 + 2 $var = Number($linesToCount2) For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i = $var To $count Next ;Code does stuff here Next Somehow my code doesn't work even though I thought I could convert the variable to a Integer / Number.
This code I posted above does not move to the next value.
But the code below does... why is that?
For $count = 1 To _FileCountLines($FileRead2) Step 1 For $i = 2 To $count Next ;Code does stuff here Next
Why is the For loop resetting itself?
Is it because the program does not cache the variable and needs to keep on acquiring this variable each time?
If so , how would you make this variable static?
I got that func
Func makeHelpImgGUI($title,$width,$height,$img) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, "HERE") EndFunc and I call this func like that
so what is the problem in the parameter where is - "HERE" I need value of img but passed as string
so $img = $SETTINGS_JPG and how make it "SETTINGS_JPG"
I tried something like that but not work
Func makeHelpImgGUI($title,$width,$height,$img) $name_str = String($img) $name_str = StringTrimLeft ($name_str, 1 ) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, $name_str) EndFunc
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