Vhriz Posted February 21 Share Posted February 21 Hello Guys! I have a very strange issue, I'm trying to make an automation for ZebraDesigner but I have ran into many issues -It seems that it has some kind of window wrapper that doesn't report Control information to Au3info. -Window Class is different in every instance, so WinActivate won't work when used in the way below $winpos = WinGetPos("[CLASS:HwndWrapper[ZebraDesigner.exe]") Is there any way I can reliably reference ZebraDesigner.exe? Link to comment Share on other sites More sharing options...
Solution ioa747 Posted February 21 Solution Share Posted February 21 (edited) you can use REGEXPCLASS look in help file for Window Titles and Text (Advanced) 210720-how-can-i-future-proof-my-code-so-changes-to-windows-handlesids-dont-require-new-edits Edit: $winpos = WinGetPos("[REGEXPCLASS:(?i)(.*ZebraDesigner.exe.*)") Edited February 21 by ioa747 SmOke_N 1 I know that I know nothing Link to comment Share on other sites More sharing options...
Vhriz Posted February 21 Author Share Posted February 21 Thanks, the solution you provided worked, I'll look more deeply into REGEXPCLASS, the syntax is not too clear for me. For example why does (?i) needed? Link to comment Share on other sites More sharing options...
Musashi Posted February 21 Share Posted February 21 9 minutes ago, Vhriz said: why does (?i) needed? Take a look at the help for https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm (?i) Caseless: matching becomes case-insensitive from that point on. By default, matching is case-sensitive. When UCP is enabled casing applies to the entire Unicode plane 0, else applies by default to ASCII letters A-Z and a-z only. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
ioa747 Posted February 21 Share Posted February 21 Extra info RegExpQuickTester 2.5p will help as well https://regex101.com/r/PmDhcj/1 SmOke_N 1 I know that I know nothing Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 21 Moderators Share Posted February 21 (edited) 8 hours ago, ioa747 said: as well https://regex101.com/r/PmDhcj/1 I really like that site, after not using PCRE engine in so long, it quickly got me back into the abstruse way of thinking again. Edit: Thanks for the link to the RegExpQuickTester, that looks promising too! Edited February 21 by SmOke_N ioa747 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Andreik Posted February 22 Share Posted February 22 @SmOke_N the best part about this site it's the debugger. Have you tried it? SmOke_N 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 22 Moderators Share Posted February 22 59 minutes ago, Andreik said: @SmOke_N the best part about this site it's the debugger. Have you tried it? Nope, never noticed it, but I just played with it, saved a bunch of cycles with an edit for same match... that's going to truly come in handy... Thanks! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now