Posts: 60
Threads: 21
Joined: Aug 2003
I still have not found a solution to this problem.
When I try to access a password protected drive on another PC on the LAN,
the password window pops up, but the password is not typed in by the macro. It just freezes. QM2 remains red and active. I can type the password in by hand and press Enter. Then the macro continues.
But I want the password typed in by QM2.
spe 500
run "\\Natalia\c"
err
key "password"
What is the problem??
Alistair
Posts: 12,097
Threads: 142
Joined: Dec 2002
Possible solution (not tested):
Create function that waits a while and then enters password.
Start it asynchronically (mac) befor run.
Function NetworkPassword:
wait 5 "Password Dialog Name"
key "password" Y
Macro:
mac "NetworkPassword"
run "\\Natalia\c"
err
Posts: 8
Threads: 5
Joined: Dec 2002
A related solution: Popup-window trigger
I tested it: the solution above works. Here is another.
Have a function set to activate whenever a window named "Enter Network Password" is created. In macro properties, you MUST indicate that the window is a popup, else macro wont work. (In Windows 98, Qm Status bar shows that the window is a popup when you hover the mouse over it)
;Handles the "Enter Network Password" dialog
;Trigger: !Enter Network Password^ /MPREXE
int w=val(command)
but- 26 w ;; unchecks that annoying "Save the password in
;; your password list" microsoft security blunder
;And to extend it:
key "password" ;; i recommend you leave this part out, for security sake
but 1 w
out "Done!"
This has been tested to work on Windows 98 SE.
(Note: The command: run "\\Bigdrive2\d", causes Qm to freeze if i break out of the macro before closing the Password dialog: clicking on Qm window just causes it to beep. Bug?)
Posts: 60
Threads: 21
Joined: Aug 2003
Thanks a lot Gintaras and Ravinder.
Both your ideas worked!!
That's the first time I've used a function.
I'm starting to see lot's of possibilities with them.
Cheers