FileBrowse causing Radio Button Menu not to redraw properly

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

FileBrowse causing Radio Button Menu not to redraw properly

Post by kpassaur » Sun May 21, 2006 10:08 pm

I am building a menu that has 8 file browse buttons and six Radio menus on the same screen. I have tested it (the script is not finished) and what is happening is that when you click on the Browse Button to Browse to a file the screen redraws it without the bottom item in the Radio Button Box.

Any ideas as to why, or what I am missing. I tried ResetDialogAction (RDA) with no sucess either.

The code is below

Code: Select all





Dialog>Dialog1
   Caption=Dialog1
   Width=822
   Height=625
   Top=CENTER
   Left=CENTER
   Max=1
   Min=1
   Close=1
   Resize=0
   Image=C:\testautorun\PresentorMainSetupMenu.jpg,-1,0,818,600
   Label=___________________________________  Buttons Setup  ___________________________________,280,9,true
   Label=File Name,415,86,true
   Label=File Name,412,242,true
   Label=Button Name,397,215,true
   Label=Button Name,397,293,true
   Label=File Name,412,320,true
   Label=File Name,415,399,true
   RadioGroup=RadioGroup1,Action For Button One,272,37,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName1,469,55,137,%ButtonName1%
   CheckBox=Save1,Save File Name For Button 1,613,57,169,False
   Edit=FileName1,469,82,209,%FName1%
   Button=           Browse       B1,685,80,75,25,3
   RadioGroup=RadioGroup2,Action For Button Two,272,115,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName2,469,134,137,%ButtonName2%
   CheckBox=Save2,Save File Name For Button 2,613,136,169,False
   Edit=FileName2,469,161,209,%FName2%
   Button=           Browse       B2,685,159,75,25,3
   RadioGroup=RadioGroup3,Action For Button Three,272,193,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName3,466,211,137,%ButtonName3%
   CheckBox=Save3,Save File Name For Button 3,610,213,169,False
   Edit=FileName3,466,238,209,%FName3%
   Button=           Browse       B3,682,236,75,25,3
   RadioGroup=RadioGroup4,Action For Button Four,272,271,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName4,466,289,137,%ButtonName4%
   CheckBox=Save4,Save File Name For Button 4,610,291,169,False
   Edit=FileName4,466,316,209,%FName4%
   Button=           Browse       B4,682,314,75,25,3
   RadioGroup=RadioGroup5,Action For Button Five,272,349,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName5,469,368,137,%ButtonName5%
   CheckBox=Save5,Save File Name For Button 5,613,370,169,False
   Edit=FileName5,469,395,209,%FName5%
   Button=           Browse       B5,685,393,75,25,3
   RadioGroup=RadioGroup6,Action For Button Six,272,427,121,70,Run Program%CRLF%Open File,-1
   Edit=ButtonName6,469,446,137,%ButtonName6%
   CheckBox=Save6,Save File Name For Button 6,613,448,169,False
   Edit=FileName6,469,472,209,%FName6%
   Button=           Browse       B6,685,470,75,25,3
   Edit=Edit0,25,135,210,%Edit0%
   Edit=Edit1,25,159,210,%Edit1%
   Edit=Edit2,25,183,210,%Edit2%
   Edit=Edit3,25,207,210,%Edit3%
   Edit=Edit4,25,231,210,%Edit4%
   Edit=Edit5,25,255,210,%Edit5%
   Edit=Edit6,25,279,210,%Edit6%
   Edit=Edit7,25,303,210,%Edit7%
   Edit=Edit8,25,327,210,%Edit8%
   Edit=BackgroundImage,27,435,209,
   Edit=InsertImage,28,520,206,
   Button=Browse,88,464,75,25,10
   Button=Browse,88,552,75,25,11
   Button=Continue,420,536,75,25,1
   Button=Exit,508,536,75,25,2
   Label=Button Name,400,372,true
   Label=Button Name,400,450,true
   Label=File Name,415,476,true
   Label=Button Name,400,139,true
   Label=File Name,415,166,true
   Label=Button Name,400,59,true
   Label=_________ Contact Information __________,28,105,true
   Label=Background Image File,67,419,true
   Label=Insert Image File,88,505,true
   FileBrowse=           Browse       B1,FileName1
   FileBrowse=           Browse       B2,FileName2
   FileBrowse=           Browse       B3,FileName3
   FileBrowse=           Browse       B4,FileName4
   FileBrowse=           Browse       B5,FileName5
   FileBrowse=           Browse       B6,FileName6
EndDialog>Dialog1

Label>MainLoop
Show>Dialog1,r
RDA>Dialog1
GetDialogAction>Dialog1,result
If>r=2,EOF
Goto>MainLoop


Label>EOF


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

Post by JRL » Mon May 22, 2006 3:34 am

Each of your radiogroup lines end with "-1". Change that to "0" or "1" and that should fix it. Something changed in one of the latest updates and "-1", which is the assigned number when you create a radio group, does not seem to function. The lowest allowable number for the radio group default setting is "0".

Maybe Marcus can shed some light on this.

Later,
Dick

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

Post by Marcus Tettmar » Mon May 22, 2006 6:47 am

Radio buttons are indexed from zero. Zero is the first item and so on. So a value of -1 means nothing is pre-selected. Setting this value to zero means the first one is selected. And so on.

This behaviour has not been changed, just fixed. It didn't work previously - nothing was selected by default, even if you set this value to 0 or 1. It is now.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Radio Button list expanded

Post by kpassaur » Mon May 22, 2006 9:33 am

I guess I didn't explain properly what is happening. The list of Radio buttons is changing. The value appears to be working (I changed it to 0). As suggested above. The difficulty is that when the menu opens the Radio Button Allows for two choices, after FileBrowse is run the unselected button disappears. At first I thought it was the bottom button on the list; however, it is the unselected one.

Image

This image should show what I am speaking of, any ideas?

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

Post by Marcus Tettmar » Mon May 22, 2006 9:43 am

Not sure why you are calling ResetDialogAction after the modal dialog has closed and then calling GetDialogAction. I think that's the problem. You don' need either. You have a modal dialog anyway. If using a non-modal dialog then your loop should look like this:

Show>Dialog1
Label>MainLoop
GetDialogAction>Dialog1,r
If>r=2,EOF
RDA>Dialog1
Wait>0.1
Goto>MainLoop

Label>EOF
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

That was it

Post by kpassaur » Mon May 22, 2006 10:05 am

I changed the loop as shown above and it appears to be working file. Thank you

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