Jump to content
Macro Express Forums

arekowczarek

Members
  • Posts

    76
  • Joined

  • Last visited

arekowczarek's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you both for the input. I was going to use pre-populated form templates originally, but now I decided against it - I'll just use completely blank forms and won't have to struggle to clear content in the populated fields requiring changing.
  2. I have a form field which is pre-populated with some content. I used "get control command" to gain access to this particular field. Here's what worries me. When I try to send some text to that filed via text type - send text directly to control, the text is placed in front of the text that was already in the filed. I tried to send <DEL> and <BACKSPACE>, and even <HOME><SHIFTDOWN><END><SHIFTUP><DEL> sequences to eliminate the old content but it doesn't work reliably (time delays are not the issue - checked it). I could use the mouse (or tab through the fields) and delete the content but that's not really the approach I'd like to use. I have to populate 30 000 forms each containing 10 fileds I want to interfere with, so every second matters (the action will be repeated every month so I need an efficient and reliable solution). Is there a trick to clear the field content with the use of controls?
  3. 4.2.2.1 it is. I decided to attach the two macros I used for testing so that you can check for yourself and during cleaning up the code I stumbled upon one unnecessary command that was affecting the "CR/LF" macro (I added logging each line into a txt file to check if it was working alright and forgot to remove it afterwards). Dumb me, I admit it (but don't quote me, I'll deny) Anyway, I re-ran the tests, and although the Text File Process method advantage is not as big as before, it is still crushing - 5 times faster than the "CR/LF" macro. I attached the macro I used for testing and the html file that was processed. TEST Text file process vs caching.mex test.html
  4. I have to admit that upon seeing your idea of separating "the lines of content" I thought that it was gonna be light speed. However I ran some tests (on a 10k line .html file) and it is still about 20 times (!) faster to use the Text File Process command rather than the splitting CR/LF macro. Really odd. The most time consuming part of your macro was checking the %LINE% array for "yoda yoda" occurence. The reason .ini files are used is because this database was never meant to grow up to this extent. Gonna convert it to csv asap or sooner. I wonder if anyone can answer some of the questiones asked in the OT? Mainly the 100 KB file being the fastest to read from. It's bugging me, I can't sleep, I can't eat, I can't... well ok, I'm just curious Thanks for the input Cory.
  5. This is what I do al the time, except it's not gonna work very efficiently with my project unless I'm doing something wrong here. Let's say I need to find this string: <p class="shortDescription" located in a .html file. Then, I need to copy the rest of the line to another file. But here's the catch. The string in question appears several times in the file. I roughly know which part of the file, so I know to only check lines 4000-7000 of the file (I know the string appearance I am looking for is the only one within this part of the file. It is easy to check the specified lines using the Text File Process. Now let's try to accomplish that copying the whole file content into a variable. How would you separate the 4000-7000 lines from within the variable and perform the string search only within that area? The only idea I could think of to determine the 4000th line area was something like this: Repeat Start 4000 times Variable modify string - Replace /CRLF/ with " "[only one] End Repeat Variable set %N[1]% integer from the position of /CRLF/. Now %N[1]% indicates where the hot content starts. I didn't even go deeper into this idea since it has already failed efficiency test vs Text File Process method. I don't think I follow here. The arrays part. One hit saving is a no go. All the data retrieved has to be saved into an .INI file. One section and 18 entries per one HTML file. Saving every .ini entry has to be performed using a separate command, so the file has to be read to (modified) 18 times (well not really 18 cause some of the entries are populated using another macro, but still: 1 command per 1 entry saved). Tests proved that if the .ini file is located in RamDisk I'm gaining huge advantage versus storing the .ini on the HDD. And by huge I mean from here o--------------------------------------------> to here. That huge That is true/obvious, Ramdisk cannot possibly outrun the RAM itself, but as I pointed above, not everything can be performed within a variable's content. Of course this statement will cease to apply if it turns out the "array" way you mentioned above can be applied as a solution. But I need you to clear this up for me. I sure know the are. Was using one for a while but had to sell it (my money printer got broken, but as soon as it's fixed I'm getting myself one). As for the tests, I think it only makes sense to compare the HDD vs RamDisk vs SDD performance when all the three tests are performed on a single machine. We have to keep in mind that macro performance is greatly influenced by the CPU speed. Even macros like this: Repeat Start 50000 times Delay 1 ms End Repeat will produce very different runtime results for different machines. 62 seconds on my current machine [Athlon 2x2.1 GHz). I appreciate you volounteered for the tests. If you're interested (or anyone else of course) in running the whole set of tests on one machine (HDD + RamDisk + SSD) I wrote a macro that basiaclly only requires setting the file directories in the macro and it's good to run. Depending on the accuracy level you choose, both read and write tests will take from 0.5 to 1.5 hours. Test results are stored in a .txt file which I'd be happy to process and dress up into charts like the tests above. The file attached is indeed a .rar archive. I had to change its extension to allow attaching it. The ancient archive of endless joy and happines.txt
  6. I guess that goes to me I have the taskbar on the bottom for the same reason I'm still stuck on XP. I need to run some games in maximised mode. I have to have the taskbar visible cause it won't let me start a macro if the game has focus (and it of course has if it is fullscreen, therefore the maximised mode). If I moved the taskbar I'd need to rewrite plenty of macros because the game window "extends" or "shrinks" to use all the screen it's given in maximised mode. And it does it in a very irregular way therefore it's not only a matter of adjusting the coordinates by lets say 20 pixels this way or another. Hope I made it clear enough but the behaviour of game window contents is very different from "usual programs" and it's not obvious if someone didn't stumble upon it. Resizing the game window by 1 pixel causes more hassle that anyone would think it could. Seriously. On my other PC that I don't use for game macros writing (bots) I also have the sidebar moved to the side [i prefer the right edge] of the screen and it *IS* much better to work with, no doubt about it.
  7. Lately I was doing lots of text file processing. And as I have even a bigger project of that type ahead of me, I was trying to find a way to speed it up. Basically I need to analyze several thousands of .html files [ranging from 50 KB to 200 KB] using text file process command and extract specific values to ONE .INI file. I thought the best way to speed the things up would be to create a RAM disk and put both .html and the .ini file there. As a matter of fact it worked - I received about 130% speed boost. But later on I got curious what part of the macro is taking up the longest and the inconsistence of short tests I run led me to creating a deeper research. Here are the results: FIRST TEST - READ SPEED: <VARIABLE SET STRING Option="\x00" Destination="%T[1]%" NoEmbeddedVars="FALSE"/> <REPEAT START Start="1" Step="1" Count="50000" Save="FALSE"/> <VARIABLE SET STRING Option="\x03" Destination="%T[1]%" Filename="D:\\1 KB.txt" Strip="FALSE"/> <END REPEAT/> <BEEP/> Using this macro I tested its runtime for text files of following sizes [KB]: 1, 10, 50, 90, 100, 110, 200, 1000, 10000. In the first stage the files were located on a HDD, in the second on a RAM disk. Each test was run three times for extra accuracy. The biggest surprise: not only the read speeds are similar for both HDD and RAM disk, but also for files 1 KB to 1000KB, files are read FASTER from the HDD (!) than the Ramdisk. For files 1000 KB and bigger there's no difference between HDD and RAMdisk. Next interesting thing that can be observed - for both HDD and RAM disk the top performace is achieved while working with 100 KB files. Not 90 KB, not 110 KB, exactly 100 KB. How come this is the "favourite" file size? SECOND TEST - WRITE SPEED: <VARIABLE SET STRING Option="\x03" Destination="%T[1]%" Filename="D:\\1 KB.txt" Strip="FALSE" _BACK="00FFFFFF"/> <REPEAT START Start="1" Step="1" Count="50000" Save="FALSE" _BACK="00FFFFFF"/> <VARIABLE MODIFY STRING Option="\x11" Destination="%T[1]%" Filename="D:\\dummy.txt" CRLF="FALSE" _BACK="00FFFFFF"/> <END REPEAT _BACK="00FFFFFF"/> <BEEP _BACK="00FFFFFF"/> Using this macro I tested its runtime for text files of following sizes [KB]: 1, 10, 100, 1000, 10000. In the first stage the files were located on a HDD, in the second on a RAM disk. Each test was run three times for extra accuracy. This looks the way it should - files are written to the RAM disk 142% - 162% faster than they are to the HDD. (the bigger the file, the bigger the difference between HDD and RAM disk write performance. Platform used for tests: WIN XP PRO 32 ME PRO 4.2.2.1 StarWind Ramdisk 5.5 [emulating 100 MB RAM disk] WD 500 GB 7200 RPM HDD Athlon x2 2x2.1 GHz 2x1GB DDR2 800 MHz RAM sticks I was trying to run the test using a different RAM disk but failed to find a different freeware (likely didn't search good enough). If you can recommend one - please do, I'll be happy to re-run the tess. The StarWind RAM disk received the most credit throughout the forums and it's free therefore it was used for the tests. What is missing here is an SSD test but I don't have access to one atm. The general conclusions I drew from the tests: 1. If the files that are gonna be processed (read from the disk) are smaller than 1000 KB it is better to keep them on a HDD rather than on a RAM disk. 2. For files of any size that are going to be written to very frequently by a macro it is way better to store them on a RAM disk. I'd be glad to see some comments on the test results. If anyone can put some light on why it is faster to read files from HDD than RAM disk and why the 100 KB files are the fastest ones to be read, please do.
  8. I don't think I follow now. All my TBDs appear in the Windows Taskbar (default behaviour). You're saying that if you display a TBD it doesn not appear in the taskbar?? I'm on WIN XP PRO 32.
  9. I think what Cory does have in mind is this: When downloading something with firefox (and I'm quite sure it's the same for other browsers) you will see a window showing the progress of a file download and its representation in the taskbar ("the taskbar icon"), also showing the progress. This way, you don't have to have the downloading window on the top to see where are you at with the file download. It would be great if it could work the same way for ME TBD. Minimising the window is not the priority (or necessity) here. As long as we can check the progress without bringing the TBD window to the front we are fine.
  10. I'm just past reinstalling windows (yep, still XP ) and I must have accidently installed the wrong version of ME (4.1.5.1). Althought the option was available in that version the help file kept silent about it. I downloaded the latest version of ME and it is mentioned there. However I find your example of usage easier to comprehend so thanks for clearing this up for me.
  11. What does "Use the search path" option in the "If file exists" command do? There's no reference to it in the help file and I couldn't figure out what that could be for.
  12. I even added a 5 second delay and it still keeps opening new windows. Dumb IE. Thanks for the tip Kevin
  13. Thanks for a speedy reply! "New tab in the current window"* is checked. And it keeps on opening the new windows as before. *It's my translation of it, I'm using Polish language version.
  14. I have a macro that opens up 30 websites using the Web Site command. When it uses FF or Opera, all the 30 websites appear in one window, as tabs. When it uses IE it opens 30 separate IE windows. Is there a way to force IE to work as FF or Opera?
  15. It can't be done with the text type command. I'm not a VB or Java programmer therefore I can't resort to it. I'd think there's a way to perform this using VB/Java script (inserted using External Script command in ME). If you know either of the languages you might give it a try. That would be the easiest way I guess. However, when I had to write some game macros that required a key pressed down for a period of time, I used a different approach. Pretty rough... but it worked. I installed some customizable on-screen keyboard (similar to the one build into Windows). I was able to decrease it's size so it was reallly small and I was able to see the game window without any troubles. Instead of using Text Type command if I wanted to press "Left arrow" button, I had my macro: 1. Move mouse over the Left Arrow position on the on-screen keyboard 2. Mouse button down 3. Delay 1 second 4. Mouse button up This is akward, no doubt bout that, but if you don't know your way around Java or VBA, this might be the only way to simulate the key being pressed for a period of time.
×
×
  • Create New...