Vhriz Posted February 21, 2024 Posted February 21, 2024 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?
Solution ioa747 Posted February 21, 2024 Solution Posted February 21, 2024 (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, 2024 by ioa747 SmOke_N 1 I know that I know nothing
Vhriz Posted February 21, 2024 Author Posted February 21, 2024 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?
Musashi Posted February 21, 2024 Posted February 21, 2024 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."
ioa747 Posted February 21, 2024 Posted February 21, 2024 Extra info RegExpQuickTester 2.5p will help as well https://regex101.com/r/PmDhcj/1 SmOke_N 1 I know that I know nothing
Moderators SmOke_N Posted February 21, 2024 Moderators Posted February 21, 2024 (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, 2024 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.
Andreik Posted February 22, 2024 Posted February 22, 2024 @SmOke_N the best part about this site it's the debugger. Have you tried it? SmOke_N 1
Moderators SmOke_N Posted February 22, 2024 Moderators Posted February 22, 2024 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.
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