sgtaw
-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by sgtaw
-
-
Any help?
Please?
Thanks,
Ed
-
Hi Cory,
Thanks for the super fast reply!
Uh... you lost me at easy!
I actually found one of your scripts on the forum that deleted 5 lines before and 8 lines after. I spent 1.5 - 2 hours trying to just delete 1 random line and pulled out 25% of my hair! I'm not too smart.
Can you give me a little more guidance?
Thanks so much.
-
Hi All,
I'm sorry is this is covered somethere already.
I wrote a macro to select a random line from a text file. It works great (The code is really ugly but it works ;-)
Now, my problem is: I can't figure out how to delete that random line from the text file.
Can anyone help?
Here is my macro
<VARIABLE SET INTEGER Option="\x00" Destination="%N[1]%" Value="0"/> <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\Edward Aw\\Desktop\\TEST\\NoName01.txt" Start_Record="1" Process_All="TRUE" Records="0" Variable="%T[1]%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%N[1]%"/> <TEXT FILE END PROCESS/> <VARIABLE SET INTEGER Option="\x05" Destination="%N[2]%" Minimum="0" Maximum="%N[1]%"/> <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\Edward Aw\\Desktop\\TEST\\NoName01.txt" Start_Record="%N[2]%" Process_All="FALSE" Records="1" Variable="%T[2]%"/> <TEXT FILE END PROCESS/> <TEXT TYPE Action="0" Text="%T[2]%<ENTER>"/>
I attached the macro below.
Thanks!
Ed
-
I don't know anything about imacros but in ME one can launch a macro from the command line much like any application can. For instance you can launch a Word document by including the name in the word.exe command as a parameter. You might look to see if imacros supports such a thing and try that using the Program Launch command in MEP.
Hi Cory,
I tried to launch via command line in Firefox, but it doesn't work or (more likely) I have no cllue how to do it!
Thanks,
Ed
-
Hi Guys!
Thanks for the responses!
Sorry for the slow reply.
Yes! I want to launch a specific iim file. That would be ultimate.
So Terry, for a FF plugin that could be run on a schedule or when a specific event occurs?
Thanks,
Ed
-
Hi All,
I found some threads that say you can call an imacros macro from MEP.
How do you do that?
Thanks,
Ed
-
Awesome!
I was just about to post that the split string worked!
Thanks,
Ed
-
Hi All,
I searched the forum, but didn't see anything. I'm sure it is here.
I want to read from a text file that is a txt. The text file has multiple rows with 2 elements per row. For Instance...
----------------BEGIN------------------
apple,fruit
turnip,vegetable
cat,animal
...
----------------END--------------------
The following code is an adaptation from code that I found here on the forum (thanks to whoever did it).
Variable Set Integer %N[1]% to 0 Text File Begin Process: c:\list.txt Variable Modify Integer %N[1]%: Increment Text File End Process Variable Set Integer %N[2]% to a random value between 0 and %N[1]% Text File Begin Process: c:\list.txt Text File End Process Text Type (Simulate Keystrokes): %T[2]%<TAB>
The direct code is here
<VARIABLE SET INTEGER Option="\x00" Destination="%N[1]%" Value="0"/> <TEXT FILE BEGIN PROCESS Filename="c:\\list.txt" Start_Record="1" Process_All="TRUE" Records="0" Variable="%T[1]%"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%N[1]%"/> <TEXT FILE END PROCESS/> <VARIABLE SET INTEGER Option="\x05" Destination="%N[2]%" Minimum="0" Maximum="%N[1]%"/> <TEXT FILE BEGIN PROCESS Filename="c:\\list.txt" Start_Record="%N[2]%" Process_All="FALSE" Records="1" Variable="%T[2]%"/> <TEXT FILE END PROCESS/> <TEXT TYPE Action="0" Text="%T[2]%<TAB>"/>
This code first counts the number of lines in the TXT file.
Then is randomly selects one of the lines to put into %T[2]%
It works perfectly.
However, I need to be able to parse that line into the two elements.
So.
%T[2]% = first element (before the comma)
%T[3]% = second element (after the comma)
I hope that explanation makes sense.
Any chance this can be done?
Thanks in advance for the help,
Ed
-
Hi All,
I am trying to create a macro that will open different URLS (separate windows) from the urls in a txt file.
I'm thinking that a loop could be used to read each line of the txt file and then a now firefox window is opened. Is this right?
However, I am clueless as to how to create that loop that reads down a txt file. I have never done this in macro express.
Thanks,
Ed
-
I thought this was an easy schedule but it doesn't seem so!
I want a macro to run every 15 minutes based on the system time.
I.e. run at 800, 815, 830, 845, 900, 915, 930 etc.
I would like it to run between the hours of 6am and 11pm.
But I can't figure it out.
Any suggestions?
Thanks,
Ed
Delete a line from text file
in Macro Express and Macro Express Pro
Posted
HI Cory,
Thanks so much.
I will look at it again. and try to figure it out.
Blessings,
Ed