
rkr
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by rkr
-
format of numbers while using _filewritetoline
rkr replied to rkr's topic in AutoIt General Help and Support
thanks Subz and Malkey... that helped me What if the variables are in format $hdet=10.061E6, and I want the total input spaces to be 6, so the results required is 10.1E6- 5 replies
-
- _filewritetoline
- format
-
(and 1 more)
Tagged with:
-
format of numbers while using _filewritetoline
rkr replied to rkr's topic in AutoIt General Help and Support
Thanks Subz, I was not precise with my requirement.... forgot to mention that the criteria was that numbers should always occupy 6 spaces ie; 10.060 is fine, if the variable $hdet was 9.060, it should appear as 09.060... also, if the number was 100.061 or 100.066, it should appear as 100.06 and 100.07 respectively. thanks- 5 replies
-
- _filewritetoline
- format
-
(and 1 more)
Tagged with:
-
Hi, i am new to autoit, i am learning a lot through the help file and through this forum, recently i notice that some times, when my script is interrupted manually or if the script runs through an accidental infinite loop - and then i try to exit the code by rightclicking the autoit icon on task bar - my computer behaves strange. when i try to right click a file, it behaves as if i am trying to click on an empty space in folder, sometimes the keyboard doesn't work, sometimes when i try to click on a folder, it open the folder multiple times. the only solution is then to do a reboot. please assist. what could have gone wrong here. thanks
-
format of numbers while using _filewritetoline
rkr posted a topic in AutoIt General Help and Support
I have a text file which has over 1000 lines, and I wish to replace one particular - I was able to do the replacement - but I have a issue - I want the numbers to be of specific format Eg; my command was as follows, my command >>>>> _filewritetoline($inp_file,$inp_replacement,"WAVE1.00STOK"&$hdet&" "&$tasso&" "&"270.0 D 5.0 72MS 1",true) my output >>>>>> WAVE1.00STOK10.06 9.800 270.0 D 5.0 72MS 1 how do I make sure that the $hdet=10.06 is printed as 10.060(3 digits after decimel) and same with $tasso and so on.. also, how to maintain the required gap between the variables - is it by manually putting spaces ? thanks guys- 5 replies
-
- _filewritetoline
- format
-
(and 1 more)
Tagged with:
-
To read a line based on string search from a text file
rkr replied to rkr's topic in AutoIt General Help and Support
thanks buddy, this helped me -
Hi, i am having a text file which has over 14000lines, i am using the following code (only part presented below) to search a string. the code is working, but this is taking lot of time, is there a better way to read and find the string For $i= 0 to $tot_lines ; $tot_lines is the total numbers of lines in file $read = filereadtoarray("file.txt") if $read[$i]=$search then ; $search is defined as the string to search $line_found=$i endif next could some one please assist, thanks
-
To read a line based on string search from a text file
rkr replied to rkr's topic in AutoIt General Help and Support
u nailed it....thanks.. but the spacing between the numbers are not same...and it varies -
To read a line based on string search from a text file
rkr replied to rkr's topic in AutoIt General Help and Support
thanks for all that KS15, just one more doubt.. i stored the following line into an array 0017-0008 0017 l2a 1 -18407.00 5110.90 0.00 0.03 -70735.59 i was trying stringsplit to store each of them above as a vairable ie; $string1 should be 0017-0008, $string2 =0017, $string3=l2a, $string4=1 $string5=-18407.00 and so on till $string9 how do i achieve this as the delimitter in this case is not a constant... in all cases, there will be 'space' between the strings/numbers, however, the number of spaces change depending on the number, sign of number etc.. thanks for all the help -
To read a line based on string search from a text file
rkr replied to rkr's topic in AutoIt General Help and Support
thanks a lot KS15, that was to the point..helped me -
Hi, how do i search for a line based on a particular key word ?.. eg ; i have a text file of format (as shown in attachment), my input to the script would be 0017-0008 and the highlighted are to be copied to a variable
-
To read a line based on string search from a text file
rkr replied to rkr's topic in AutoIt General Help and Support
@KickStarter15, thanks for that detail help.. i tried the code, but i am getting error message - but the file is in the same location - tried _filecountlines and it worked perfectly - which means the error is not due to lack of access. i am attaching the text file (gaplst.) and the script with this. could you please have a look.. thanks copychunk.au3 gaplst -
Hi, i want to read a particular string from a text file using autoit. i wish to read it without explicitly opening the text file. the copied string should be then transferred to an excelbook (again, no need to explicitly open the excel book)... with reference to my screenshot attached, my input to the 'script'' is going to be 0017-0008, and the script should copy the highlighted two lines from the input file to excel thanks
-
Hi, I have a software which has a 'run file'-ie; when i double click on that file, the input file of the software is run by the software. I wish to double click/execute this run file using autoit. how do i achieve this. i opened the software and it shows the input file and run file in same folder, i will put my autoitscript file too in same location. how do i simulate double clicking the run file (using its file name, say - abc.run ). I entered the following lines to make software window active - it became active, dont know how to go forward Winactivate("program title") winwaitactivate("program title") controlclick("program title","abc.run",1000,"primary",2) ; 1000 is ctrl id
- 2 replies
-
- third party software
- execute
-
(and 1 more)
Tagged with:
-
i will try to explain it here in detail.. if you open the text file 'GMS Det Leg.txt'- it has 2 lines -> LOADCN P 1.166 & LOADCN R 1.166 .. the autoit pgrm should open the notepad replace the numerals 1.166 based on an equation (here, just increase by 1 and 1.5 respectively for each lines) and the notepad is to be saved/closed. this should repeat till the top line become LOADCN P 9.166 .. i believe my intention is clear... thanks for all suggestion
-
hi, i am new to autoit. i prepared the attached code which will replace particular values in the file. the program works well in the first pass, but the while loop is not working in the second go. could anyone look into the attached code. If the ';#' in the code are replaced with '#', then the program works well. sacs-read.au3 GMS Det Leg.txt
-
thanks all.. is there a good book to go through for Autoit. i feel the online/autoit help file a bit non structured.. Eg; it doesnt explain why particular libraries are included.. i felt that the tutorial lacks a flow. please suggest
-
Hi, i am new to Autoit. I was trying to automate a simple process with excel on win10. the code is below. i initially ran with mousecoordinates set to screen option(default) - it ran seamless #include <AutoItConstants.au3> run("C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE","",@SW_MAXIMIZE) ;run( winwait("Excel") ;MouseClick("left", 555, 272, 3, 0) MouseClick("primary", 490, 351, 32, 0) winwait("Book1 - Excel") MouseClick("primary", 56, 236, 1, 0) send("hello") Send("{TAB 4}") send("check") .. the code was slightly altered, and when i opted mousecoords to window origin, excel window opens behind the active window ( i have to minimise the active window and click manually to continue from line 4 below) #include <AutoItConstants.au3> AutoItSetOption("MouseCoordMode",0) run("C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE","",@SW_MAXIMIZE) ;run( Global $a1, $a2 , $a3 $a1=1.0 $a2=2.5 $a3=$a1+$a2 winwait("Excel") ; DirCreate ( "d:\xyz\abc" ) MouseClick("primary", 513, 227, 33, 0) winwait("Book1 - Excel") MouseClick("primary", 62, 242, 1, 0);Opt("MouseCoordMode",0) ; send($a1) Send("{TAB 1}") send($a2) Send("{TAB 1}") send($a3) mouseclick("primary",0,0,3,0) ;Send("{TAB 1}") send("{enter}") mouseclick("primary",218,352,1,0) send("d:\xyz\abc\11.xlsx" ) send("{enter}")
-
Hi, i use autoit recorder to record the mouse clicks. i just want to record how to automatically open a notepad.. the procedure i followed is uploaded as a video. when i run the .au3 file, the windows key gets activated and then the 'notepad' is not getting typed. In the taskbar, the script appears paused after this- what could be the reason. all this happened after i migrated to win10 from win7..thanks