mhannan13
(Lurker)
2002-11-26 02:14 PM
Need Help With This One!!

I have put together a script that connects the users correct group and private drives at login, If any drives are missing, the script then runs a visual notification on the screen telling them that '******' is not connected. What i would like to do is be able to send this visual notification to a Dir. for storage.

Any help or advice would be greatly appreciated.


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 02:16 PM
Re: Need Help With This One!!

visual to a dir?
could you explain little what you are trying.

as, what I see from your text, you want to catch that visual message, do a screen print and save that image in somewhere?


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 02:18 PM
Re: Need Help With This One!!

oh, and if dir. = director, you can do that with sendmessage()

mhannan13
(Lurker)
2002-11-26 02:20 PM
Re: Need Help With This One!!

The visual is basically a popup window. You are totally on the right lines, what i would like to do is gather that info in the popup and then export it in notepad etc. into a remote directory or file.

LonkeroAdministrator
(KiX Master Guru)
2002-11-26 02:21 PM
Re: Need Help With This One!!

so, next question, is this kix window?
meaning, is it messagebox() ?

or some third party util or other scripting language?


Kdyer
(KiX Supporter)
2002-11-26 02:22 PM
Re: Need Help With This One!!

mhannan13,

Is this when the user is fully logged in and you run a NET USE and you see a disconnected resource?

BTW, Welcome to the board!

Kent


mhannan13
(Lurker)
2002-11-26 02:29 PM
Re: Need Help With This One!!

yes, it is a messagebox( ).

Kdyer
(KiX Supporter)
2002-11-26 02:33 PM
Re: Need Help With This One!!

OK..

The construct would be as follows:

NET USE > TEST.TXT

Then do a READLINE on it and if found with any Disconnected Resources display a messagebox.

Kent


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 02:40 PM
Re: Need Help With This One!!

kent, I wonder...

if he already has the error somewhere (most likely in var) as he is putting it on the screen with messagebox.

he can do the same with writeline or echo:

shell "%comspec% /c echo $errorinwhat $whatwaserror >> $errorlog_somewhere"

the net use can achieve the same, but if there is error, doesn't it take more time to query it again?


Waltz
(Seasoned Scripter)
2002-11-26 02:42 PM
Re: Need Help With This One!!

it would be useful to see some code instead of speculating in the wilderness?

Kdyer
(KiX Supporter)
2002-11-26 02:45 PM
Re: Need Help With This One!!

I think we are in the phase of trying to see what he is trying to achieve.

If he does it as a messagebox, it could prompt a call to a Support Desk to put out any fires.

However, what we have done is use an SMTP mailer like POSTIE or BLAT to e-mail our group and we take care of the issue on the "back side."

Thanks,

Kent


Kdyer
(KiX Supporter)
2002-11-26 02:50 PM
Re: Need Help With This One!!

mhannan13,

I think we may have something for you -

Looking at the FAQ

We find..
File Operations

Look under:
4. Test for Drive existence with notification

I think this maybe better from an end-user perspective where they do not have to dismiss a dialog box (messagebox).

HTH,

Kent


mhannan13
(Lurker)
2002-11-26 04:03 PM
Re: Need Help With This One!!

Please email me if you would like to see the script.

Thanks for all the advice so far.

regards

mark


Sealeopard
(KiX Master)
2002-11-26 04:05 PM
Re: Need Help With This One!!

You might also want ot check out the DisplayText(), Err(), Warning(), and WriteLog() UDFs. All of them can be used for extensive logging purposes..
code:
use x: \\server\share
$rc=Err('Error connecting drive')

would for example write into an error log on a central server.


Kdyer
(KiX Supporter)
2002-11-26 04:05 PM
Re: Need Help With This One!!

Is this detection piece really that big?

If you have company-sensitive information, you can change it for posting.

We cannot work on telepathy here. [Smile]

Thanks,

Kent


LonkeroAdministrator
(KiX Master Guru)
2002-11-26 04:11 PM
Re: Need Help With This One!!

got mailed.
made a reply, will see.

there is nothing actually, simple log-file stuff is just perfect.