The Unofficial Macro Scheduler Puzzler #12

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

The Unofficial Macro Scheduler Puzzler #12

Post by JRL » Sat Oct 21, 2017 3:31 am

Hard to believe but its been more than three years since Puzzler #11. Thought I'd make #12 less strenuous. Won't require coding just a little sleuthing. I have a simple question. Below is a script that presents a dialog for a couple of seconds. Puzzler #12 asks the question, how does this script relate to the FindImagePos> function?

Any questions? Any answers? Any point to this?

Code: Select all

Dialog>D1
object D1: TForm
  BorderStyle = bsNone
  Caption = '190'
  ClientHeight = 400
  ClientWidth = 400
  Color = 16715468
end
EndDialog>D1

Show>D1
Wait>2.09

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: The Unofficial Macro Scheduler Puzzler #12

Post by PepsiHog » Mon Nov 13, 2017 7:36 pm

Hey there JRL!

I seriously do not believe I am correct here, but running this script several times makes me venture a guess that it relates to FindImagePos> because every time you execute the script, the window appears in a different position. Because the dialog has color, a script may be written using FindImagePos to find the position of this window. I am thinking that you are trying to see if someone would consider this option instead of using other obvious commands.

If I am wrong, here is my second guess. It says to FindImagePos, "I am a dialog and I don't have to find anything. Glad I'm not you! Sucker!"

How'd I do?
PepsiHog

Oh, yeah! I was first at being wrong!
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: The Unofficial Macro Scheduler Puzzler #12

Post by JRL » Mon Nov 13, 2017 8:00 pm

PepsiHog wrote:Oh, yeah! I was first at being wrong!
OMH... I'm sure glad I didn't say my inaugural crowd was the biggest ever. :)

But when you're right you're right, you're wrong.

That said:
PepsiHog wrote:Because the dialog has color
Is on the verge of being about 20% correct














OMH = ???

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: The Unofficial Macro Scheduler Puzzler #12

Post by hagchr » Tue Nov 14, 2017 8:47 am

Hi JRL, long time no Puzzle... He/She who waits for something good...

I get an error when I run it "Error in: _debug.dbg. Line: 1 - Unable to load content for dialog: D1. Error in dialog block"

Any idea what is happening?

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: The Unofficial Macro Scheduler Puzzler #12

Post by PepsiHog » Tue Nov 14, 2017 1:08 pm

Over My Head, right?

I looked it up and it says "Oh, my heaven", "Oh my hell", and "Oh my heck". Personally, I like mine better.

Just ask me, and I will explain it to you. :lol:

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: The Unofficial Macro Scheduler Puzzler #12

Post by JRL » Tue Nov 14, 2017 10:48 pm

@hagchr,
No idea why it would fail unless you're running a version of Macro Scheduler older than v12. You really don't need to run it to figure out the answer.

@PepsiHog,
I doubt anything is beyond your abilities. You are obviously a talented and fun loving person.
For the scope of this posting OMH was meant to be "Oh my Hog" but you are justified in thinking of the acronym as any phrase your heart desires.

@The world,
The answer is a slight stretch on accuracy with several clues in the script.

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: The Unofficial Macro Scheduler Puzzler #12

Post by PepsiHog » Mon Nov 20, 2017 2:50 pm

@JRL,
That's funny because I had actually considered that, but I thought that may be a little self centered. (or whatever that would be called)

I'm sorry. I studied this one. Tried to figure it out. I mean beyond the first post I posted. But I got nothing. I think this one is just OMH. LOL!

I will be waiting for the answer. Interesting puzzler. Thanks for the compliment. :)

PepsiHog

[edit] I hope that was a compliment. I hope I didn't offend you, wasn't meant like that. Yea, probably over-thinking it. But that's just what I do. :roll:
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: The Unofficial Macro Scheduler Puzzler #12

Post by JRL » Mon Nov 20, 2017 7:34 pm

@PepsiHog,

Of course it was a compliment. Plus, the only way you could offend me would be to intend to offend me. No intent... no offense.

@The world,

Time for some serious clues.
Look up and read help for FindImagePos>. We're now well past Halloween but I put a hex in this puzzler.

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: The Unofficial Macro Scheduler Puzzler #12

Post by PepsiHog » Mon Feb 26, 2018 8:41 pm

Ok, JRL, not to be rude or anything, but we have been waiting and it is clear no one knows the answer and I want the FREAK'n answer!

I spent A LOT of time trying to solve this one.

It's your answer and I want it now! Don't make me get my lawyer! I'll do it! I will.

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

The Unofficial Macro Scheduler Puzzler #12 Answer

Post by JRL » Wed Mar 28, 2018 3:02 am

JRL wrote:@The world,
The answer is a slight stretch on accuracy with several clues in the script.
The script wrote:Dialog>D1
object D1: TForm
BorderStyle = bsNone
Caption = '190'
ClientHeight = 400
ClientWidth = 400
Color = 16715468
end
EndDialog>D1

Show>D1
Wait>2.09
JRL wrote:Look up and read help for FindImagePos>
Help for Find Image Pos wrote:CCOEFF:Tolerence should be given a value between 0 and 1 where 1 is a precise match and...

Code: Select all

//Dialog Color = 16715468
//Split dialog color into its RGB components
ColorToRGB>16715468,vred,vgrn,vblu

//Convert the three components to hexidecimal
Format>%x,vred,hexred
Format>%x,vgrn,hexgrn
Format>%x,vblu,hexblu

// Add an "O" where there should be a zero (a slight stretch on accuracy)
MDL>%hexred%O%hexgrn%%hexblu%:Tolerence should be given a value between 0 and 1 where 1 is a precise match and...

//Hexidecimal hints in script
Format>%x,209,res
MDL>%res% = D1

Format>%x,400,res
MDL>%res% = 190

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: The Unofficial Macro Scheduler Puzzler #12

Post by Marcus Tettmar » Wed Mar 28, 2018 8:31 am

Woah. That is a bit off the wall. I'd have never have got that!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: The Unofficial Macro Scheduler Puzzler #12

Post by JRL » Wed Mar 28, 2018 1:39 pm

I did call "Look up and read help for FindImagePos>" a serious clue. Every time I read help for FindImagePos> I think "html color" when I see "CCOEFF". I was hoping at least one person in the Macro Scheduler world would do the same. Perhaps I should have posted the following as the answer.

Code: Select all

DeleteFile>%temp_dir%purple.html

LabelToVar>HTML,vData
WriteLn>%temp_dir%purple.html,wres,vData
Let>RP_Wait=0
RunProgram>mshta.exe %temp_dir%purple.html
Wait>3
KillProcess>mshta.exe

/*
HTML:
<html>
<head>
<script>window.resizeTo(400, 400);</script>
<title>Puzzler</title>
<HTA:APPLICATION
APPLICATIONNAME="Display Color"
BORDER="none"
SCROLL="no"
INNERBORDER="no"/>
</head>
<body bgcolor="#CC0EFF"
</body>
</html>
*/

User avatar
Djek
Pro Scripter
Posts: 148
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

Re: The Unofficial Macro Scheduler Puzzler #12

Post by Djek » Fri Mar 30, 2018 4:51 am

pfff. i find this answer a bit "farfetched",
but, thanks for this anyway, i think?

I still consult my lawyer and let him try to get some of my time back....
He will get in touch with you !
:D

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts