Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. That's quite devious. What happens if I change screen res or font size?! Now that I've found that the Variable Set String with Prompt dialog is not resizable, it seems quite silly. You can set a multiline string "now", but not with prompt. Why would there be a difference? Given the fact that ME must be used in a lot of small offices, why wouldn't you have multiple Input box dialogs/forms - just like ME's setting dialogs? With those you can tab quickly from one box to the next. I'm surprised that there hasn't been demand from the larger users of ME. Although I haven't done it for a while, in Excel, the first thing I would do for a database was to create an input form with multiple Input boxes.
  2. "I'm sure there must be a more intuitive way to express complex logic sequences, but I'm darned if I know how" You're right. In complex industrial design you don't create logic with computer code. You use logic diagrams (using AND, OR, NAND, NOR gates etc). Even a simple latch (equivalent to a relay latching in using a momentary pushbutton) is so much easier to visualize. In that case the output is fed back into the input to hold it in. Where you have thousands of pieces of logic interconnected it's the way to go. Once the design is done, you can convert to whatever programming you are using (eg computer code or discrete electronic logic gates). Flow charts are basically the same thing. You can achieve the same thing in computer code by compartmentalizing per my logic and Terry's but it's so much more difficult. I'm sure it gets easier with practice. I wonder if Paul's code is something that you would arrive at during design. Most of us think in intuitive terms as Terry mentioned which is not going to give the most elegant mathematical solution. Perhaps that's the difference; the plebs would be happy with working code, Paul&Co would tidy it up!
  3. I was wondering how corporate users (or anyone else!) handled data entry where many items have to be collected. Single "Variable Set String at Prompt" repeated is not a great interface. Perhaps the usual is to set up a form in another application such as Excel? A text file set up similar to an ini file where the user fills in the "key values"? I use "Variable Set String at Prompt" with "/" as a separator between items - the "menu" is in the Prompt. Perhaps the "field" names could be preset in the dialog and you overtype. Is a multiple variable input form something ME is lacking? (edit) As soon as I posted I thought I had a great idea. Set input string first, Variable Set String %T[1]% to: First Name: Family Name: Apt No: Street Address: District: Town/City: County: State/Province: Then set T1 with Prompt and the above would be the preset. You could fill in the information and process the variable to extract entries. The bummer was that the Variable Set String with Prompt is only a single line. You cannot resize to show multiple lines. I'll make that a Feature Request to ISS.
  4. I'm sure Paul or Cory have far more complex logic but anyway, here's one of the 4 blocks (I could not find it until I realized it was in ME3). To separate visually I add a full-width Comment between each block. So that I could troubleshoot, instead of ANDing the blocks I set text outputs and performed the ANDing with those. If Variable %N11% = 23 AND If Variable %N1% = 0 OR If Variable %N1% >= variable %N11% Variable Set String %T40% "run1" End If The question was, if you did all the ANDs first then the ORs would it make a difference compared to starting top to bottom. Cory pointed out that it was executed top to bottom. When you think about it, it would be hard to do it any other way because logic truth may depend on knowing the results of previous logic. In my example the value of T40 must be known before you can resolve its ANDed use further down. The above logic was time/date-related. The original logic was more complex because I was using AM/PM versus 24hour clock. Such a pain in ME3 but so much easier in MEPro with decimal time. Re IBM, they were the guys that back in the day said there would only be a market for 5 electronic computers.
  5. Re Help in general, it's a community effort although I take credit for maximum verbage, "Never mind the quality, feel the width". Good to see someone else's code. I'm sure I've mentioned this before but one can look at some of the things we do with ME and they seem a bit tedious. Case in point, up to 30 down arrows to enter a date? My comment, what else is your PC going to do with its time?...and you don't even have to give it Air Miles. There are so many ways of doing things: 1. You can do a down arrow for each day (checked) 2. If Home and End work you can do the lower half with End and count up 3. You can enter 1, 2, or 3 and then the digit down arrows for 11, 12 etc, or count up 4. PM to self, create hotkey macro to get to T99 etc in Set dialogs (actually that's just an easy, whopping mouse drag) BTW us stick-in-the-muds still use Set Integer Variable to Day of Month but it's so passe. The Date/Month additions in Pro are awesome.
  6. It sounds like the keyboard hooks aren't working. Are they set on Auto in Options/Miscellaneous? The backspace as you correctly said should delete a character but IE is grabbing it first (previous page shortcut).
  7. I thought I'd ask about all the other things too. By running manually that would be by right-click and Run now? That mode of operation should show it basically works but bypasses interlocks such as Scope. It WILL run although not necessarily activate the pop-up. The macro will not run if other macros are running. That is universal however you try and start a 2nd macro. Manual mouse click is not valid as a test in case the pop-up has protection against automatic clicking ie manual click always works. Have you checked the Scope? The macro will not run at scheduled time if it's the wrong window name or whatever Scope you used. You can set your scheduled time to say 20 secs. Set the Scope Global and see if it clicks every 20secs on empty Notepad. Then see if it runs with the window, still on Global Scope. If that works set your desired Scope and test. If it's a browser (you have not said for sure what it is but sounds like it), use a partial title in case the page name changes from day-to-day. It's also possible the page name changes as the pop-up appears. You are checking "Play macro indefinitely" in Set Schedule/Other dialog? No other macros running? No other activities running? Is the pop-up associated with any software on your PC - makes it easier for author to install anti-autoclicking protection? That's all I can think of for now.
  8. With simple T, N, D variables you are generally dealing with small amounts of data. I know that you could still make arrays back in the old days but it needed some expertese. Now that it's so much easier for the novice to blindly gather large amounts of data, it is more difficult to decide if values have actually been set. I would imagine it could be really bad in companies collecting data from all over the place where no one person can see what is valid and what is not. If it's "# of Toyotas sold", 0 could be valid or the salesman was too lazy to fill the field. The problem is the same for the T, N, D variables of old so it's nothing new. Taking an integer array: %myvalue[1]% is set to 1 %myvalue[2]% is not set %myvalue[3]% is set to 0 If you use in a loop for n Get %myvalue[n]% You will get the same result for %myvalue[2]% and %myvalue[3]%, 0, because the default is 0. Read any unset integer array member and it's 0. You cannot use "" with Integers, which is not surprising; you have to compare to 0. In your Text String example, you could not tell if it was a genuine blank entry, "Your thoughts on Relativity", or the default blank setting. To have a flag to indicate "Set" would need 1 bit per array member in ME, although probably more than that in practice. If you were processing the array, all unset members would be skipped to save time. It won't cure incorrect data entry but at least tackles the initial filling of the array. If you don't fill in the required fields in web forms, it tells you fairly quickly.
  9. This subject has given me headaches since your post. I've been trying to figure out if the order really matters. When I was looking at my blocks of logic, the function that joined them certainly needed some thought, AND or OR. Mentally you have to put the blocks in brackets. There is no way I could start programming at the first line of the 1st block and finish at the end of the 4th block one line at a time, even if that is how they are executed.
  10. ME cannot burrow very deep into the window detail so would be of limited value for making bots and miners (I think). I suppose if you get it to click all over the screen looking for stuff it could be a nuisance to others. Not everyone plays online. Jamess' problem sounded to me more like he's using the colour value for something and it's causing the 800x600 window to resize. We'll have to wait and see.
  11. Thanks for the registry idea. I'll give that a try. AutoIt is highly capable in GUI but unfortunately GUI programming is a nightmare - following Windows at a similar technical level. Very user-unfriendly and I can see why ME is a bit limited graphically. A simple dialog box is not difficult - or are you thinking more of a button? I have the AutoIt exe looping at 150mSecs which seems fine - you don't have to hold the key down very long for it to register. It passes the keypress to the ini. Currently I have only set four keys, End, keypad 1, 2, 3. Selected for applicability(End) and uncommon use (keypad 1,2,3). The more keys you add the slower it is and the more likelihood of someone pressing a hotkey by accident. I could add Ctrl+ Shift+ etc to give safer hotkeys but the current setup is fine for my purposes. The ME Repeat's If statements would read the keypress and write "" back to the ini. Each keypress could be used to trigger a different event. I was intending the usage to be for slower Repeat loops. On a fast PC it would be fairly invisible. You have to wait for the ME Repeat loop to pass through next time before the If is read so it's not an instant exit. My need came from doing some realtime measurements on the PC. For speed I put readings into an array for processing at the end. I set a large number of repeats to ensure there were enough. After a while I had what I needed but could not exit the Repeat. If I stopped the macro, I would lose all the data since it had not been committed to text file. To date I've been using the bottom right corner of the screen as active and using mouse position to jump out of loops. Keypress affords variable paths of action. I'll see how the registry thing goes and maybe post the codes.
  12. I doubt I can help but is there any relationship between behaviour and what is active on the 2nd PC? Hardware differences? Your knowledge may be beyond this but you could check "KVM switch" in Wiki - it has a few paras on compatibility. (edit) I think this multi-PC scenario has come up before. There are alternatives if the KVM issue cannot be resolved and PCs are networked. To save power, I run my 2 PCs over VNC and normally use one keyboard, mouse and monitor. Perhaps if they are not networked you can use a null modem cable to directly connect? No switch of any sort is required - the other PC is just another Task Bar application.
  13. Don't forget to report to ISS with more detail. The first one is not that uncommon (I've had quite a few with Test Run and the Editor). You need to forward the circumstances. The stuck comment on its own is not much help to ISS in debugging. Things do seem to be improving with time. The second could occur if you accidentally Import a previously saved configuration or restore a Backup but that should be fairly obvious. Enable/disable is manual or could be by macro command. Errant mouse clicks selecting one macro intended to be disabled while having a currently disabled macro also accidentally selected?
  14. The first step is that every time the macro runs, get it to append the current time to a text file. That way you can tell how the timing is drifting. That allows the most basic adjustment - if it's losing 20 secs between activations, reduce the schedule cycle time by 20 seconds. That will keep it running much longer even if your PC is responding poorly. Your window is 5 minutes every 90 minutes and you are only getting 6 successes in a row. That sounds like a lot of drift. If the schedule is slipping back (which was always the case in my timing tests) then you should start the macro running at the start of the 5 minute window. It will have to drift 5 minutes for the macro not to work. If you set it near the end it will quickly drift into lateness. My second suggestion of adding code to the main macro to count down the time worked perfectly and would activate within a second of the PC clock time indefinitely (the res of ME's timing setting and readout). The main problem was that it was awkward to set going and that for some reason the count down caused the timing to drift. On 10 minute cycle I got about 18 successes before it drifted to the alarm point. On a faster PC it may never drift. I did not get further than the prototype. (edit) You should also observe what is going on every 90 mins for an extended period to see if other things are happening. That would include the active area moving or changing shape, pop-ups interfering. You could also consider doing multiple clicks spaced out time-wise and location-wise. Also seeing if there is some way to tell the click has been effective (to initiate other click patterns if necessary).
  15. Thanks for bearing with my density! The Desktop is one of the more useless areas of the GUI which is why your approach seemed odd. Not much accessible from it. Any program starts from it are intended for manual initiation. If you did not have so many desktop macros you could simply add shortcuts for them to the Desktop, which is how I normally change my random wallpaper. I made those wallpaper macros into mxe files so it's a straight link on the Desktop. You should be able to do some sort of shortcuts using Command Line Parameters per the Help. I don't use pop-ups - can't you initiate a pop-up or some form of menu from a Desktop shortcut? How about a radio button Multichoice Display? Or a checkbox Multichoice Display so you can do the whole shooting match in one blaze of macros, sequenced or simultaneous! I do that for my TV webpage downloading. It brings up a Multichoice Display - I can check individual macros if I wish. The first checkbox will initiate all of the macros sequentially. You could even preset your most common macro selection so you don't even have to click, just hit OK! I've been thinking about revisiting some of my old macros now that I have a wider knowledge and more ideas on how to beat the system. Who was it said you shouldn't play in the registry? All my graphic editors seem to show the filename in the taskbar tooltip. I don't have any that I minimize to the tray but I suspect they would have the same tooltip. I just posted that thread about getting the full tray icon tooltip from a partial using External Script. You would search on the partial application name and get back the full tooltip including the graphic name. Unfortunately they don't all return the full filepath. I took a look at Paul's comment about CPU usage, running TP's slideshow display. Quite interesting. Not surprisingly it makes a big difference on image size. Using Task Manager as a rough guide, large images (>2000 linear pixels) that had to be downsized could use up to 75% of my slow CPU/64MB graphic card for a few seconds. Screen-sized images that did not require any resizing barely reached 20% CPU in no time. If you were changing the latter every 30secs it's nothing for a contemporary PC/graphic card.
  16. It is not clear what the problem is but some fundamentals: The Mouse Locator gives colour values in Decimal BGR and Hexadecimal RGB (Red, Green, Blue) For integer comparisons (compare colour under mouse with reference colour in macro) it has to be Decimal BGR. If you are using the colour under the mouse in your game, perhaps the game needs another colour format such as HexBGR, DecimalRGB or HexRGB. How are you using the colour value in the game or macro? Was something missing from your comment where I've added ?????? - "Using the above command, the color value of "0" is written as ????? In fact, the "0" must be a value other than notation" Keep on asking until we find the answer!
  17. I'm wondering if you can use Regular Expressions in the Window Title exceptions box (or any other filespec for that matter). I think it's unlikely but does anybody know?
  18. How do you know a value is null? An integer 0 could be a genuine value or the default (which is returned when examining an empty member's value). If you keep track as you go that's fine, but then that needs another array.
  19. I got the wrong end of the stick(s) there. I saw Slideshow and not Wallpaper and I'm thinking of Activation not Scope. I got into the Activation groove because you talked about lack of hotkeys and "my macro must activate when all that is visible on my screen is the desktop". I still can't see why your macro cannot have Global scope and do the Win+D command first in the macro? If you have an odd restored down window but can still see part of the wallpaper for selection purposes, the macro will run, minimizing that window first. Then you can have whatever macro steps you wish. Repeating the Win+D at the end restores windows to previous states (mostly, not those minimized to tray). Perhaps it's related to using a hotkey for two tasks and differentiating by Scope? Perhaps I'm being dense. Program Manager seems to be a vestige from Windows 3 where it was a window and the main location to run programs from. It has Windows window properties. It appears to be a real oddball as shown by Paul's "Desktop on top and one out of focus window". Perhaps that's a glitch in ME's programming. For the average user, Desktop is not treated as a window. If you send a window to the bottom, it does not disappear, it's still above the Desktop. It's quite clear that ME sees Program Manager/Desktop as a window because it lists it as Visible. Put * as exceptions and it's bound to include Program Manager/Desktop. (edit) I double-checked Program Manager's status on my PC using AutoIt. Program Manager is a visible window, handle 0x00010080 so there is agreement with ME's window listing. There's a reasonable explanation of window order here. Re hotkeys, when I extracted the stats for all my macros to Excel, I found that half had no activation. There is a limit to how many hotkeys you can remember and are also reasonably accessible with one hand. I start most macros from ME Explorer and save the hotkeys for macros that can only be that activation. In office situations I guess you would be more likely to use pop-up menus and a few hotkeys. Re graphic editors, IrfanView is my Win default and I also have FastStone (which can also store thumbs). I normally have TP running and if I want to see some images I activate its slideshow button. I also have some IrfanView slideshows (fixed content) activated by ME. I don't see much point in having changing desktops if you cannot see them under other windows but then I'm running everything fullscreen. If I had a wallpaper slideshow that I wanted to see I would Win+D. Anyway, "Chacun a son gout" and all that. I don't change wallpapers automatically but I have a shortcut on the Desktop that activates an ME macro that changes the wallpaper randomly from any folder or folder tree. Making it automatic on a timed basis would be possible but ME is a bit iffy with timing in those sort of situations (no ability to halt) and the macro may be more troublesome with other macros running (compared to WSS Pro).
  20. I've been working on resolving the "If key is pressed.." scenario (as opposed to "Wait for key press"). That would allow user decisions while a repeat is running, like stop the repeat and process results obtained so far; print results now; jump to another part of the macro. I started off with an External Script version that passes the keypress via the Console/Text Variable but it's slow due to opening and closing the script and user32.dll. The Text Variable is examined in the repeat loop and action taken if valid. I then produced a working AutoIt exe that runs in parallel to ME and passes the pressed key to ME via an ini file. This is moderately fast, adding about 2secs for 1000 repeats in ME. I've been looking at passing to ME via a ConsoleWrite from the exe file. As far as I can see, ME cannot read from the console other than via an External Script. Is that the case? I don't want to use the Clipboard in case the main macro is using it.
  21. One thing I would use it for is to preset Array values using a Repeat loop. I think I mentioned in a previous post that there is no way to tell if Array members have actually been set. If you find a "" or 0 or 0.0 you may not know whether it's a genuine value or the default. I would use a repeat loop to set to say, "notset" or some integer or decimal value that is unlikely to be met. That way you can evaluate empty from filled array members. Not necessary for most purposes but useful for critical data and very large databases that you cannot possibly know from memory. (edit) Come to think of it that also comes under Paul's comment about declaring size at time of creation. I suppose if you have a number of arrays within a macro that you are processing it could be useful.
  22. You should get a decent bulk image editor like ThumbsPlus (payware). No brush tools but does overall image corrections. It's slideshow capability is comparable to most standalone applications. At any time you can break the slideshow and edit the current image. If you want to go to an external brushtool-type editor you can customize the toolbar to open the selected image in the application. Using the internal editor, it remembers the last edit so you can quickly do repetitive edits on a set or create a batch file with custom settings. You can update thumbs live or keep them stored in a database for quick image access. It will load a folder of 10,000 made thumbnails in seconds. It's one application for which I've almost no ME macros. It already does everything I need. Kind of disappointing. It's also an application that uses simple keystrokes like C (colour correction), L (last, repeat previous edit) so there's minimal two-fingering. (Edit) Activating with the desktop sounds one of those scenarios where it can be firing off at unexpected times. You could not put it in a macro file with your normal "daily" macros. Well, you could but I wouldn't! Presumably your plan is to hit the slideshow hotkey to stop or freeze the slideshow and the macro will then run. If that is the case why can't you have a hotkey macro that checks if the slideshow program is running; if it is, stop/freeze it and start Picasa or whatever?
  23. I'm not exactly sure what you are trying to do but writing to a text file is quite easy: Variable Modify String - Save to Text File saves the variable over any existing content Variable Modify String - Append to Text file saves the variable in the next line below existing content You will probably need to do add a trailing CRLF after each entry - checkbox provided. You can create the text file in advance using Notepad or if you enter the full path and filename in the Variable Modify String dialog it will create the file for you. If you have a number of text variables that you want to update overwriting previous values, an ini file may be better. I'll not go into those at this stage as text files may be good enough.
  24. That's quite bizarre! Next time I need scope for "Desktop on Top and One Window Out of Focus", I'll just slap it in.
  25. Good luck! I've forgotten all about that code. It looks far worse on paper. Normally, if you program as you go this would be fairly routine although lengthy to troubleshoot. Based on how many you intend to do, you will have to decide if manual entry is quicker overall.
×
×
  • Create New...