Jump to content
Macro Express Forums

Brain Virus

Members
  • Posts

    43
  • Joined

  • Last visited

Posts posted by Brain Virus

  1. But that was what was requested, n'est-ce pas?

     

     

     

    what if the area he checks contains 25 pixels... 5x5

     

    pixel 1,1 could be 123456 and the macro would stop... but pixel 1,2 is 0

    the macro would have stopped before reaching the second pixel

     

     

     

     

    @ funnyboy, either mine or Alans method would work. However, i recommend Alans... its a bit better because it will stop after finding the pixel... say there are 1000 pixels to check.. and number 250 is the black pixel you want.. it will stop at 250 while mine will check all 1000

     

    although... if you add an if %N1% (the boolean) equals 1 end repeat that would stop it. So actually, in retrospect you have 2 ways to accomplish the same thing

  2. In pseudocode:

    Repeat Until %n1% not equal 0
     Get Pixel at location x, y into %n1%
    End Repeat

    The trick here will be to determine what values x and y should have each time you execute the Get Pixel command.

    If the values of x and y remain the same, then this macro will simply run until the pixel located at x, y is no longer 0. If that pixel never changes, then your macro will run for ever!

    If you want to move along a row of pixels, or down a column of pixels, then you need to add 1 to x or y respectively.

     

     

    im not sure that would work...

     

    say he was looking for color 0. say the first pixel he finds is 654321. that does not equal 0 and the macro would stop

    he could repeat until %N1% = 0 but that would go in an endless loop if 0 is never found.

    I think a boolean system like the one i suggested would work for him.

     

    if i am wrong or misunderstanding your coding, please correct me. :)

  3. Okay, say you are looking for pixel color 0 aka black

    Set var %N1% to 0

    Get pixel value into var %N2%

    Do all the checking for the pixels

    After each pixel check do a if %N2% equals 0 (black) then set %N1% to 1

    Then after you check the pixels

    If %N1% equals 1 end repeat

     

    I am doing this on my phone so sorry for the brevity. Let me know if you have any questions

  4. I have made quite a few that range from resetting pw in bulk, moving them, creating copies of accounts, assigning login scripts and setting home folders.

     

    It pretty easy to work with. Some tips for navigation.

     

    when you open the profile window for the account and you want to get to another tab (you cant use controls for this in 2003): shift+tab up to highlight the general tab then arrow left or right to cycle through to the proper tab

     

    to get to a specific field: alt+(letter) example alt+m on the general tab will jump down to the email field.

     

    To make sure you get the right user: Do a pixel check for black on the picture of the little guy to the left of the search results and one space down. Have it pause if it returns a black pixel, this will allow you to select the correct user if you get multiple results

     

    the quickest way to highlight the search result is text type arrow left

     

    to bring up the right click menu when you have a user highlighted text type <APP>

     

    to navigate the move menu have the macro type the first couple letters of the OU you want, then arrow left to drill down, then repeat until you get to the correct OU

     

     

    Let me know if you have any questions and i would be more than happy to assist you.

  5. What is the error or problem?

     

    Your can check the resolution by doing a set variable from width and height and then export that to a .txt to check.

     

    The other thing, how are you connecting to the system? RDP or a vnc client? If you are connecting with RDP, when you disconnect, it will log out the session. Try using a VNC or logmein.com

  6. Hello all.

     

    This should be an easy answer:

     

    How do you tab 16 times without 16 lines of <TAB>? Isn't there a short formula for this? Something like <TAB:16>? I can't figure it out.

     

    Thanks!

     

    Pat Gennarelli

     

     

    You can do text type: <TAB><TAB><TAB><TAB><TAB><TAB><TAB>.. etc all on one line then after that put the delay option that tell it wait for the text playback to complete.

     

    or you can look into using controls to see if you can use it in that application

  7. i have figured it out and it works extremly fine and i have put it out for testing on live systems. Need to wait for the results though. For me ti worked fine. I am putting out the code for anyone it might be useful to pull data from webpages where the action of tab and arrow is nullified. Last but not the least a ton of thanks to brandon who gave me this idea.

     

     

    no worries,

     

    Hows the deployment? anybody having issues?

  8. I'm not real sophisticated and don't write scripts. I have chopped long MP3 files into many smaller units with names like FILE 1.mp3, file 2.mp3 etc. I need to insert a zero in fron of the number and I have a macro that does that once I've done the left click on the file in windows explorer and selected RENAME. There are MANY files and I'd like to auomate the left click-select RENAME part but I can't get it to work. Is there an easy way, without knowing how to write a script, that I could accomplish this? Even better, can I just put it in front of my macro to insert the zero??

     

    Thanks for any help you can give.

     

     

    Hi to automate it without mouse clicks, you can do this: arrow down to select the next mp3, the text type <APP> command brings up the context box like if you had right clicked on it and then m selects the option to rename it.

    <TEXTTYPE:<ARROW DOWN>><TEXTTYPE:<APP>><TEXTTYPE:m>

  9. Hello.

     

    I am writing a macro for a database, but at times a popup comes up that I want to minimize so it does not interrupt the macro. However, this popup is totally random and unpredictable.

     

    How do I set up the macro so when the macro is running, it can minimize the popup at ANY time during the macro?

     

    BTW, the popup title is always the same. That never changes so it can be always detected in the same way.

     

    Pat

     

    There are 2 ways that i can think. With ME3 you can just have it check after every action to see if its there. to keep your code short just do:

     

    IF window title on top

    run macro"popup closer"

    end IF

     

    then write a macro that will close that pop up

     

     

    or in ME PRO

     

    you can run macros at the same time, so you can just make a macro that activates when that window activates.

  10. Here is a macro that will do just that.

     

    It saves the selections to a variable then displays it at the end.

     

    Poll_Macro.mex

     

     

    EDIT

     

    I looked at your code, and understand what you are trying to do now.

     

    I figured out the issue. on the first menu, you have the destination variable set for T5 and the next boxes are doing their logic off of T1. Also, on the first set of option dialog boxes, you have the destination variable set to T1 instead of the T2 that the second set is basing the logic off. and the last set of diag boxes have been changed to output to.

     

    Here is the corrected macro

     

    variables can be frustrating at first :)

     

    tocmo0nlord_Tree_Macro_Fixed.mex

  11. Here is something rough that I came up with.

     

    Its accurate within 4 pixels.

    (it scrolls 5 pixels at a time, you can adjust that to make it even smoother, and it will be more accurate, but it will be slower, which may or may not be the ticket for you)

     

    To see it in action:

     

    1. Run the macro, then click anywhere on the screen. Keep the mouse still for a half second.

    2. Move to some other random location on the screen and click there. Again wait a half beat.

    3. The macro will jump back to point 1 and then scroll over to point 2

    4. When its within 4 pixels, it will display a Dialog box stating the macro is complete.

     

    Mouse_Scroll_To_Random.mex

  12. VERY close!

     

    I'm hung up at actualy defining the hex value for the color. The site may change, it has one of three posibilities. If it's *green* then <run this macro>, if any other color <run this one>. I can't seem to put the color into a variable and then say something like "if color under mouse is "this" then <do this>" :/

     

    Thanks

     

     

    well does the pixel you need to check always appear at the same spot? if so double click the get pixel command and then launch the mouse locator from the dialog box that pops up. and then you can define where to search for the pixel. that will also tell you what ME sees the pixel color as. Then you just need to find all the colors and plug them into the macro.

  13. Trying to get a fairly simple macro going. Just don't have a lot of experience in the logic stuff. Want to do something like this:

     

    if <color matches hex value>

    then <run this code>

    else (color doesn't match) <run this code>

    end

     

    Simple! :)

     

    The logic looks right, what is your question/problem?

  14. Do I need to clear varibles at the beginning of my macros so they don't accidently get recycled? In other words do the varibles get carried over from the last time they were run?

     

    I had a macro do something kind of odd, so I'm trying to figure out why it did what it did.

     

    You dont have to if you define all the macros in the variable. but depending on the situation like if you are appending to another variable then yes you do

    <CLEARVAR1:A:ALL>
    

    clears all variable

     

     

     

     

     

    If you explain what happens and maybe post some of the code we can look through it and try to figure it out.

  15. I have a IE6 web-based application with 10 possible web pages that may appear, all with the same window title but (obviously) with different content. I need my macro to identify which page is currently appearing. I can:

    (1) Alt-View Source, and analyze the text that pops up in a Notepad window. .

    (2) Edit-Find text unique to each page, copy to clipboard, and analyze whether the text was found.

    (3) Use the Ctrl-a combination to highlight all data on the screen, copy to clipboard, and analyze.

     

    The trouble with all of these is, they are visible to the user. Edit-Find is probably the least obvious if it’s a small amount of data. Can anyone suggest an invisible way to retrieve and analyze the text on a web page? The solution is probably there somewhere in ME, I just don’t know where….

     

    Thanks for any and all ideas.

     

     

    You pose a good question...

    I couldnt find anything in ME or ME Pro (granted i am not super familiar with ME Pro)

    I tried hunting around online for a tool that might snag the source and save it, but they looked kind of sketchy.

     

    I did find a vbs script that might work for this,

     

    Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
    Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
       Dim lngRetVal As Long
       lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
       If lngRetVal = 0 Then DownloadFile = True
    End Function
    Private Sub Form_Load()
       'example by Matthew Gates (Puff0rz@hotmail.com)
       DownloadFile "http://www.allapi.net", "c:\allapi.htm"
    End Sub

     

    its just what i was able to hunt down while searching for a solution.

  16. Hi,

     

    i want to make a makro wich gets text from clipboard, reformates its content and append it to a file. I am not familiar with textprocessing in Macro Express.

     

    The clipboard text is in such a format:

     

    Personname

    (Department)

     

    Income: XXXX Entrydate: XX.XX.XXXX

    Sex: XXX Age: XX

     

    Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-

    Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-

     

    The file should appear like this:

     

    PersonName#Department#XXXX#XX.XX.XXXX#XXX#XX#Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text-Some text...

     

    The formatinglogic isnt so hard but i dont find the right commands in ME to manipulate strings.

     

    Any ideas?

     

    It kinda looks like you wanting all the spaces removed correct?

     

    What about in the sometext area?

  17. I think your theory is less bunk than my theory. My theory is that the internet in general is 80% technology, and then in math that only a witch doctor could understand, 25% Voodoo and I base this on all of the inconsistencies we've all experienced over the years.

     

    For Macro Express I'll stick with your procedures. Before long though I'll probably have to bite the bullet and learn a new system by purchasing iMacros. I played around with their free Firefox plugin a few months ago and it doesn't seem to have this problem. But I really like Macro Express...

    You can use macro express to call Imacro macros. I am happy you mentioned that plugin. I am going to be meshing it with some funky macros that i have at work. It should work great :D

×
×
  • Create New...