Page 1 of 1

passing a variable to dialog box

PostPosted: Mon Feb 09, 2015 12:47 pm
by stevec
I'm using a plugin lgaDialogLogin, it contains two variables [PwdBoxUser] and [PwdBoxPwd]

I have following set in the page properties

SetVar "[PwdBoxUser]" "[UserName]"

When I use the action to open the dialog box, the [PwdBoxUser] is blank.

lgaDialogLogin "" "Enter password"

Is there a way to populate the dialog box with the {PwdBoxUser] not being blank?

I have tried the sendkeys, but that does not work.

The input Box would work, but as it is a password there is no option for using ****** to hide the password

Thanks;
Steve

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 10:06 am
by stevec
Hi all;

I put on my thinking cap and went through some of the embedded action commands.

I did the following by creating a Custom Window and using the Input Box and two buttons.

Button to open the window********************

SetVar "[PwdBoxUser]" "[UserName]"
CustomWindow "Enter Password" "336" "279" "Group1" "DialogBox+Exclusive"

and the 'OK' Button*******************

DOSCommand "net " "use S: \XXX\XXXX [PwdBoxPwd] /user:XXX\[PwdBoxUser]" "RunOnce+Wait"
CloseCustomWindow "Group1"

******************
now if I can get the Tab/Focus to work on the OK button when the text is put in.

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 10:55 am
by Neosoft Support
I'm not familiar with lgaDialogLogin so I can't help with that.

now if I can get the Tab/Focus to work on the OK button when the text is put in.


The problem is knowing when the user is done entering the password. You switch focus to the OK button before they're done entering the password. Instead what you might try is setting the OK button's shortcut key to ENTER. Then they can type the password and press ENTER to continue.

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 11:18 am
by stevec
Awesome!

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 1:01 pm
by Gaev
Steve:

I did a search of this forum for "lgaDialog" ... found this other post from a long time ago ...

viewtopic.php?f=7&t=13447&p=11174029&hilit=lgaDialogLogin#p11174029

... are you sure you want to deploy a plugin that has not been supported by its author for a while now ?

Having said that ...
When I use the action to open the dialog box, the [PwdBoxUser] is blank.
lgaDialogLogin "" "Enter password"
... assuming there is some form of documentation/help info ... what are the two parameters for this command supposed to reference ? ... the first parameter is supposed to be blank ? ... perhaps you can post here what this plugin command is supposed to do for you.

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 1:14 pm
by dec
Hello,

Gaev wrote:... are you sure you want to deploy a plugin that has not been supported by its author for a while now ?


And, on the other hand, I think NeoBook can achieve a dialog like that using a custom window. ;)

Or am I wrong? :?:

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 1:37 pm
by stevec
Gaev;

the IgaDialog box works. In my continued and ongoing effort to simplify and streamline my work, I was hoping to 'omit' one part of the process of drive mappings, by eliminating the [UserName] typing. Every now and than I get a crazy idea and try and make it work.

Dec;
you're correct. I was able to do it with the Custom Window/dialog box.

Matter of fact, in the Pub files, it says I don't even need the IgaDialog plugin.


I have been tinkering with the idea of trying to figure out how to actually create a plugin, I downloaded the plugin.sdk and a utility called 'Lazarus' thats a Delphi editor.
I haven't come across a decent tutorial on how to create one. I posted another post in the plugin area, in case someone wants go give a few pointers.

Much appreciate the feedback from some of the masters.

Re: passing a variable to dialog box

PostPosted: Tue Feb 10, 2015 2:10 pm
by Gaev
dec:

And, on the other hand, I think NeoBook can achieve a dialog like that using a custom window. ;)
Or am I wrong? :?:
Yes, NeoBook has the native commands and widgets to build something that asks the user for his/her Name and Password value ... or if we wait half a day, dec and his incredible plugin machine will add something similar to lgaDialog into one of his plugins :)