Jump to content
Macro Express Forums

hpram99

Members
  • Posts

    35
  • Joined

  • Last visited

Posts posted by hpram99

  1. I don't understand what you're trying to accomplish. I don't think you can import the way you're thinking exactly but if we had a more general idea of what you're trying to accomplish we might be able to offer better alternatives.

     

    Kevin's solution of relying on password security is how i do it usually. I too initially wanted to come up with a player only install for users but I found there was really no need. Also when a user has a workstation specific issue it's nice to be able to pop open the editor with a password so I can test no the problem machine.

     

    Question, why wouldn't the Load New Macro File command not work for you? Essentially you would do the same thing. Personally I like this one for my laptop and for special installations. For instance I might have manager macros and grunt macros. Well instead of having some convoluted method I have every machine start with a locally installed luncher macro. Then based on machine name, user name, location or whatever it can load different macros off the network. So if user A logs in on another machine and I set it so user A always gets the manager macro in the logic of the launcher macro load the manager macro wherever user A goes. BTW you Can create a CSV file or INI file on the network someplace to manage users like this. On my laptop I travel a lot and on different sites I want to load different macros so the macro detects where i am and launches the appropriate macro for the site. Works slick.

     

     

    I guess I should be a little more clear on what I am trying to accomplish...

     

    Macro Express was decided by management above me to disallow anyone from using the editor in fear they would waste time trying to write their own macros instead of just doing their jobs.

     

    I wrote a macro that writes macros.... yeah... I know.

     

    All it does is generate a shortkeys style macro, as each individual will have their own way of typing things, it's not possible to write this into a macro myself, managing all the users personal scripts would be impossible and impractical.

     

    I'm basically trying to find a way to allow people to very easily make a shortkey script, but be able to import it into macro express without the editor.

     

     

    Hope this makes sense..

  2. Never mind, I found it

     

    Set %T1% to ascii code 8

    Send test %T1% to control %C1%

     

    <ASCIIC:1:1:8><TEXTTYPECT:1:%T1%>

     

    Notes:

     

    code 127 (the original rub-out code) doesn't work, it must be ascii code 8. Unfortunately I'm finding that not all applications recognize the field as being blank when using this method, as it still contains the "backspace" character.

  3. Could you maybe change the file for the pointer cursor at the start of the drag action and then change it back when the macro has finished? There might even be a registry entry that would handle this better, I'm not too sure. Just something to think about. :)

     

     

    No registry value can do that. It can't even be done via windows scripting host.

     

    Very simple through VB or C++ though. of course you'd have to compile an EXE and distribute it just to hide/unhide the cursor.

     

    Might want to resarch if it might be possible to write a .js to do it.... I'm not sure.

  4. I have a half-satisfactory solution. I store a "master"' macro file on a network drive, and I can update that whenever I want. Each user has his own macro file on his C: drive, which is refreshed from the "master" by a simple copy-file prior to ME startup when the PC is rebooted. (I also start ME in the batch file that does the file-copy.)

     

    So far I haven't had to update macros mid-day, but if that becomes necessary I will give users an icon to a batch file that ends ME, refreshes the macro file, and restarts ME.

     

     

    This is what we already do, and works great. I have an "auto update" macro that runs after 3 hours of inactivity.... a macro to update a macro :blink:

     

    But this isn't what I'm looking for unfortunately. Any other suggestions? is the editor still installed but just disabled? would there be a way to temporarily enable macro express editor to import, then disable again?

  5. not exactly able to refresh the temp folder because what you see is not what's really on the harddrive, if you browse through DOS you'll see it's actually a bunch of random folder names with no files inside.

     

    I've found that extracting this data is not possible through simple scripting (vbs) but requires manipulating the windows shell commands through a real programming language like C++

     

    Even then it's fairly undocumented, not reccomended, and difficult.

     

    Dropping the idea, we may be dumping macro express soon and moving on to iMacros

     

    Thanks for the input anyway.

  6. Can't think of how to get this to work, if I send text to control, any keystrokes are interpretted literally, so <shiftd>h<shiftu>i would come out as "<shiftd>h<shiftu>i" not "Hi"

     

    I'm trying to send the delete key to a control... how do I do this?

     

    I could set focus to Control, then type Delete, however this particular app will pop-up other windows on top, I've been running it like this for months, have had really really bad things happen when it hits "delete" on the wrong window.

  7. No matter how similar each user's computer is there are still differences. Things like how many other programs are running at that moment, how long their computer has been on, and the equipment used to connect them to the network (switches, hubs, etc.). I once read an article written by a network admin who discovered that a problem with some of their computers was based on the distance away from a switch. A computer would fail in the end user's cube but work fine in the testing lab. In short, there are too many variables to assure that everything is really identical.

     

    While I agree that no computer is completely identical, you would assume that a PC that is identical on paper would not have such drastic differences. I really believe this is an issue beyond simple manufacturing variance etc....

     

    Just to give you an example, a macro that types "tab" 20 times will work in 1 second on one PC, yet take 8 on another.

     

    It's supposed to take 8 seconds. How is it that one PC is so drastically different with the exact same specs as 20 other pc's?

     

    If your problem is primarily getting fields copied reliably into the clipboard, see a recent topic "Old chestnut - unreliable clipboard copying". Paul suggests, in that topic, setting the clipboard to nulls before doing the copy-to-clipboard, so he can then check (in a repeat loop) for a non-null value to determine whether the copy has completed. He has written a callable macro for that purpose. Because the repeat loop runs only long enough for the clipboard operation to finish, it should in theory adjust automatically for faster vs. slower PCs.

     

    I will reply to that topic and see if Paul will publish his clipboard macros for us to try, since I am seeing the same problem you are, though with Citrix screens rather than browser screens. I wonder, for one thing, how he distinguishes between a truly null field that he tries to copy-to-clipboard, as opposed to a copy request that has not completed? Also I wonder whether the copy-to-clipboard is an all-or-nothing operation, or one that may be partially complete. That is -- if I do the clipboard copy command on a 20-character field, wait 10 millisecs, then check the clipboard contents for non-null, then wait another 10 millisecs and check contents again -- is it possible that the first wait will give me perhaps 7 out of the 20 characters, the second wait will add a few more characters, and so on?

     

     

    Good suggestion, I'll look into it. In answer to your question, everything in computing is progressive, but in all reality there is no way to distinguish this as the clipboard will not be available until it's finished with it's initial task of being filled... so really it is all or nothing.

  8. No, I understood you. You are downloading a URL over and over again and want to get the raw HTML each time and grab something from it. I do this all the time. I have done it your way but recently I started playing with WGET. With this I can WGET the URL to a file without downloading all the graphics and junk. So I basically copy the URL to a specific text file on the HDD and suck that into a variable in ME3 where I parse out what I want. In my initial tests it works very well.

     

     

    wget downloads the page, I already do this, this is not what I'm looking for.

  9. I've been working around issues with timing for quite some time now, I need to know at this point what the root cause of the issue is.

     

    Everyone is using the same coreload on virtually identical systems. There are 30 people using the same macros, about 10 of them right now have issues.

     

    The macros run at completely different speeds on different machines, when tabbing through a webpage, it will blast through and skip over the fields it needs to copy to the clipboard.

     

    I have forced the configuration to slow down default timing to 300micros for keypress, and 300milis for clipboard

     

    I've turned off the high speed timer on all the pc's also, as it was even worse with it on.

     

    IE7 Firefox, whatever, doesn't matter what browser, the issue is the macro will run way to fast on these pc's. and if I slow it down any more than it already is, then it gets very annoying for the people that it already works for.

     

    Why does macro express run differently on different pcs?

  10. Check out WGet. It allows one to essentially just download the HTML of the target without having to use a web browser. Then you can parse the HTML in ME3. In fact your macro can be completely invisible to the user. Of course it does much more but I think that's all you need. And it's free.

     

     

    Thanks for looking, but I think you might have skipped over the first line in my original post :)

     

    Unfortunately this is what I am already doing with an MSXML object. I want to AVOID downloading the page, as this is very time consuming (several macros run for minutes, not seconds)

     

     

    I also posted this question in a vb/vbs forum, but so far all I've got are crickets

     

     

    edit: If needed, would it be possible to move this to the 3rd party forum? I realize this isn't going to be possible in ME natively

  11. If the file does not already exist I ask the user to pick a folder with the Variable Set String and choose the Set Value to Folder Name (Prompt) EG T1. Then I use Prompt for value to as them for a file name EG T2. I then save the file with Variable Modify String - Save to Text File with something like %T1%%T2%.txt. Sometimes one needs to do something about the extension too. I add a routine to check if there is a period 4 characters from the end and if there is I don't try to add or prompt for a file extension. Then it pays to check to see if the file already exist and if it's locked.

     

    Yes, this is what I'm doing, see post #8 above

     

    http://pgmacros.invisionzone.com/index.php...ost&p=11872

  12. How about something like this:

    // Here: T1 contains information to be saved to the file
    
    Variable Set String %T2% from File Name
    If Variable %T2% <> ""
     Variable Modify String: Save %T1% to Text File
    End If

    <REM2:><REM2:Here: T1 contains information to be saved to the file><REM2:><TVAR2:02:09:Enter filename><IFVAR2:1:02:2:><TMVAR2:17:01:00:000:000:%T2%F><ENDIF>

     

     

    Looked perfect. Except when I enter the filename into the dialoge box, it says it cannot find it.... because it's trying to open an existing file.

     

    For right now, I've got a series of commands like this:

     

    <TVAR2:01:01:contents of file here><TVAR2:02:10:Select where you want to save this><TVAR2:03:02:FEnter a file nameFFCenter:Center><TVAR2:04:01:txt><TMVAR2:17:01:00:000:000:%T2%\%T3%.%T4%F>

     

    Still not ideal, but much more useable. If there's any way we can get yours working Kevin, that would be fantastic.

     

    rberq: I know, already there. Had to explain scope creep to another colleague requesting something because "I'm right there anyway" :rolleyes:

  13. Open Notepad (empty file), type %T1% into the Notepad screen, then type ALTDOWN - F - ALTUP - A. That should open the "Save As" Windows panels and the user can type the filename and navigate to whatever folder he wants using screens that are (hopefully) familiar to him.

     

     

    Good idea thinking outside the box as I could output T1 to notepad.... only issue is how can I detect where the path is from that dialogue? once the variable is saved, my macro needs that path to throw it in the registry (among other things)

     

    Still not the ideal solution.

     

    I think I might have to post in the 3rd party solutions forum, or write a vbs that opens the save as box for me..

  14. "Prompt for value" option within Variable Set String

     

    This isn't a filesave option, it's "enter text here"

     

    How many uses would you trust to know how to enter a full path and filename into a plain text box?

     

    As your own signature states "I'm trying to make this foolproof, but I'm badly outnumbered."

     

     

    Need a better solution. Anyone else?

  15. Ah! An existential crisis! Is ME a keystroke capturer, or is it a programming language?

     

    I hereby cast my vote for adding GOTO to ME. That, and some fancier date-time-manipulation commands, would be high on my wish list.

     

    I agree with 100% committance!

     

    A Marker and GOTO command would be fabulous.

     

    I'm not sure if you know this but ME's date/time manipulation is already pretty good (although not great), check out the "date" and "date/time" commands under the "Text" catagory

  16. I have macros that are dynamically re-downloading the webpage I'm currently looking at, so I can get the source code and parse certain information out of it.

     

    We work on a vpn client through a proxy, on a 512kb line. Re-requesting a 500kb file kinda sucks, so I'm looking for a more efficient way of doing this.

     

    I have the url, and tried grabbing the file this way:

     

    If file exist:

    %userprofile%\Local Settings\Temporary Internet Files\event_edit.asp?event_id=%T7%

    Load file into variable

    (the page was identified in this folder as "event_edit.asp?event_id=" then the event number)

     

    Unfortunately the way windows displays the files in Temp Internet files, is not the real file name. the real filename is just "even_edit.asp"

     

    Windows obviously has some way to identify the entire URL of that file - using the index.dat I presume - is there any way I can have macex correctly identify the correct temp file?

     

    This might require a 3rd party script like VBS...

     

    any suggestions are appreciated.

  17. If you are interested there are shells that will allow a normal interactive application to 'Run as Service' but like Kevin said your macro could not use any user interface and whatever you want to do would have to be able to do under the service account. But if you just need to do something monitor a folder for a file and push it somewhere it can be done in theory.

     

    If you are using ME for maintenance sort of things and not user helpers one trick is to run ME on the console session of a server or what have you. The console needs to be logged on and you can join it from a TS session. This allows one to disconnect and the macro keeps going. Just need to turn off the monitor and hide the keyboard of that machine. Crude but it works. ;)

     

     

    Sorry to bring a topic back from the dead, but could you elaborate more on these 2 topics? This is running on a server, but it MUST be logged out when not in use, my only option is to sit down and write it all in vbs (big nasty "ugh") or use one of the 2 solutions you suggested.

     

    What I need does not require a single bit of user input. I'm using this for a sort of 'dynamic' reporting of our ticketing system, here's what it does:

     

    Writes a vbs script to file and runs it

    the vbs starts an http session and downloads some html

    saves to another file and returns to the macro

    macro express loads that file and parses the nessesary info out of the html

    macro appends the results to yet another local file

     

    I can't see any issues with this running as a service, but know very little about these shells that run apps as services. Any freeware out there that can simplify my life?

     

    Edit:

    Never mind, I'm an idiot when I start work at 3 am.

    For anyone who cares, here is a good document to read up on:

     

    http://support.microsoft.com/kb/q137890/

     

    It doesn't specify, but I know the resource toolkit is for Server 2003 (not 2000)

  18. Under Text, there is a Date command that allows you to put today's day name into a text variable.

     

    The same Date command allows you to set DD (day of the month) back x number of days from today's date. Unfortunately when setting DD into the past, the command does not accept a variable so you will have to use a CASE or a series of IFs to do the setback.

     

    So first, Save Day Of Week 2 (format MON, TUE, etc.) into T1

     

    Then,

    If T1 = "MON"

    Save DD into T2 (with 1 day setback into the past)

    End If

    If T1 = "TUE"

    Save DD into T2 (with 2 day setback into the past)

    End If

    If T1 = "WED"

    Save DD into T2 (with 3 day setback into the past)

    End If

     

    etc. Copy and paste below.

     

    <Day of Week 2{NP000}{P000}01><IFVAR2:1:01:1:MON><DD{NP001}{P000}02><ENDIF><IFVAR2:1:01:1:TUE><DD{NP002}{P000}02><ENDIF><IFVAR2:1:01:1:WED><DD{NP003}{P000}02><ENDIF><TBOX4:T:1:CenterCenter000278000200:000:Day%T2%>

     

    Holy moly!

    I'm finding more and more I need to write K.I.S.S. all over my cubicle walls.

     

    Thanks a bunch!

  19. After a search I couldnt find anything on this. Can a Macro be multi-threaded? Say for data entry, launching a web page, to process a csv file and enter data into fields of web page.

     

    This has been very time saving for repetitive tasks of course, but to have multiple instances would be wonderful :)

     

    Thanks in advance!

     

    What you ask is not multi-threading, it's simply multi-tasking, or running multiple instances of the same macro

     

    in answer, no, one macro at a time.

     

    What I do to save time is call macros that dynamically write and run vbs files, and not wait for it to finish before continuing in the original macro.

    Be careful with this, depending on what you're doing, a loop in the macro may launch your vbs as fast as it can, causing 100 instances to start running at once and crash your PC.

  20. I'm drawing a blank, what would be the best method for finding the Day and Month of the first day (Saturday) of the current week (regardless of what day of the week it really is)

     

    A big issue is what about today? July 1st

    Start of the week is June 29th... how do we get the correct month AND day?

     

    I'd imagine it would be something along the lines of

     

    get month

    get day

     

    something to find out what day of the week it is (perhaps using some sort of divisor of 356?)

     

    if difference of day and startingday < 0

    then month = month - 1

     

    something to find how many days in last month

    subtract difference from days to get correct date.

     

     

    help!

  21. Yes, the lack of a 'hard delete' option in macro express is sometimes a pain in the neck. It's appropriate that macro express supports the existing functionality of using the recycle bin, but it should also have an option to bypass the recycle bin. (The macro express help file is clear that deleting a file really only sends it to recycle bin.)

     

    If using the 'empty recycle bin' command is not acceptable for your situation (e.g., you can't delete all the other contents of the recycle bin), then you simply need to overwrite the file when you are done with a new file of the same filename with empty or garbage contents, as per Marcopolo's suggestion. You can then delete your dummy file (that is, move to recycle bin), and even if somebody later recovers the file from the recycle bin, the file no longer contains the sensitive information.

     

    Another option to consider is whether you really need to store the sensitive information in a temporary file, or can you have that information go into a macro express variable or environment variable?

     

    I appreciate the suggestions and ideas, in the mean time I had been devising my own way of "deleting" these files.

     

    I now pass sensitive information to a vbs using arguments, and when I'm done I use a blank variable to overwrite the temp file. I just leave it in windows %temp% file, as it is going to get overwritten again next time the macro is run.

     

    -- Let me tell you, one of these macros will run every 30 minutes on our fileserver to generate a report. The first time I looked at the recycle bin and saw 1300 files in the trash containing passwords; I almost fell off my chair.

×
×
  • Create New...