Jump to content

Reading UserName from a file or storing permanently for use in script

Recommended Posts


I have created the method to change and store the Username to a file:

$UserNameMe = GUICtrlCreateButton("Change User", 160, 50, 120, 30)

            Case $UserNameMe
               $UserName = InputBox("UserName","Enter UserName","","*")
               $FILEme = FileOpen("C:\AutoMe.txt",2) (I would prefer encryption here but is just user and no PWD)

What I cannot figure out is how to send this data to the the server(s) once I trigger the script to launch the connection...  I can read the file but would rather it be persistent in the code rather than writing to a file and reading from it.

                Case "AR DEV"
                    ShellExecute("Server URL") (There are 75 plus servers, and the username of each person is the same based on user, so I need to be able to set it based on user, all users will use their own name to access the servers)
                    Sleep(4000) (I would rather not use this... but cannot get Firefox to wait till active and it also needs to work in IE)
                    Send("$UserName") (This is obviously not working :))
                    Send("{TAB 1}"))  (At this point they would input their pwd)

The attached code will probably not run as I have removed several hundred lines of it and is just for demonstration,

The pic is also just a representation.

Any guidance/Help is appreciated.



CHI Rhapsody6 Launcher.au3


Share this post

Link to post
Share on other sites

Just a note the username should be pretty simple, but I am not grasping it.  The user will have to use the same name multiple times... on different servers... so are browser based and some are actual server.  The only time they would need to change this is if someone else used the PC to login.  I can get the username saved to a file,,, just cannot get it to read the file and populate on the username field.  I can get to to user field, just not paste the saved name.  so for the most part a single username is all that will be needed.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now