10-21-2010 11:17 AM
Hi, I have converted an aut script to vb. In that used so many user dialogues . One of them is,
uservarcompile ("test")
Sub xxx
userdlgcaption= "abc",
USERDLGTXT(3)="Choose filter" USERDLGCOMMAND(3)="filt_" Call USERDLGOPEN()
If DLGSTATE<>"IDOk" Then ' <<< case sensitive Call AUTOQUIT() End If
end sub
.
.
.
.
.call xxx()
The confusing thing to me is, when i run my script no commands will display. Only text will be displayed. When i copy paste the above code in a new file(with out including sub xxx line) and run it displays all the text and commands.
Then if i run my original script it displays its commands now. whats the reason for this.??
10-22-2010 01:29 AM
Hello Rash.patel,
In your VBS code are some small bugs. Please have a look at the attachment to see details. The following VBS works fine.
Sub xxx userdlgcaption= "abc" USERDLGTXT(3)="Choose filter" USERDLGCOMMAND(3)="filt_" Call USERDLGOPEN() If DLGSTATE<>"IDOk" Then ' <<< case sensitive Call AUTOQUIT() End If USERDLGTXT(3)="Choose filter" USERDLGCOMMAND(3)="filt_" Call USERDLGOPEN() If DLGSTATE<>"IDOk" Then ' <<< case sensitive Call AUTOQUIT() End If end sub
By the way, this kind of dialog is very old (but still works of course). If you are going to use SUD dialogs you will have more flexibility and match more design and layout options.
Greetings
Walter