Dialog Button syntax?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

Dialog Button syntax?

Post by jj45410 » Sat Nov 29, 2008 2:33 am

Dialog>Dialog1
Caption=Websites
Width=445
Height=156
Top=CENTER
Left=CENTER
Button=Mjtnet.com,24,16,385,25,10
Button=Google.com,24,48,385,25,11
Button=msn.com,24,80,385,25,12
EndDialog>Dialog1

Show>dialog1,res1
If>res1=10
Exe>http://www.mjtnet.com
EndIf
If>res1=11
Exe>http://www.google.com
EndIf
If>res1=12
Exe>http://www.msn.com
EndIf
That is the script but I wanted to know what the numbers after the websites are? what are they used for?
Button=Mjtnet.com,24,16,385,25,10
Button=Google.com,24,48,385,25,11
Button=msn.com,24,80,385,25,12
and why do you have to use tab before writing the code?

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

Post by JRL » Sat Nov 29, 2008 6:03 am

That is the script but I wanted to know what the numbers after the websites are? what are they used for?
Button=Mjtnet.com,24,16,385,25,10
Button=Google.com,24,48,385,25,11
Button=msn.com,24,80,385,25,12
The numbers are the parameters used to define a button object in a Macro Scheduler dialog. If you go to "Help" in Macro Scheduler or use the online Macro Scheduler help. Then go to "Command Reference", and look up "Dialog" you will see a section describing how Macro Scheduler dialog objects are defined.
...and why do you have to use tab before writing the code?
Sorry, I have no idea what you're referring to. Can you explain what "tab" you have to use before writing code?

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

Post by Marcus Tettmar » Sat Nov 29, 2008 11:12 am

The numbers define the position width and height of the button.
...and why do you have to use tab before writing the code?
I'm afraid I too have no idea what you mean here.
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
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Sun Nov 30, 2008 3:08 am

Possibly this refers to the use of TAB or Indentation to make your code more presentable and readable. (it is not vital to the code in MS scripting).

Example:

Code: Select all

IF>Something
      Something else
      And again
      This is all tabbed in so you can tell that it is in the IF loop
ENDIF

IF>Something
This is not tabbed
and therefore 
confusing
ENDIF
With some languages tabbing is vital to the syntax.

Of course I could have completely misunderstood the question.


:lol:
Phil Pendlebury - Linktree

jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

Post by jj45410 » Mon Dec 01, 2008 1:46 am

Nope, spot on ty.

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