| View previous topic :: View next topic |
| Author |
Message |
metro123 Newbie

Joined: 01 May 2006 Posts: 4
|
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Tue May 02, 2006 5:47 am Post subject: |
|
|
Which OS?
If your IP is represented in an environment variable, you can get it with this
| Code: |
myIP = Environ("IPADDRESS")
|
Does this help? _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
metro123 Newbie

Joined: 01 May 2006 Posts: 4
|
Posted: Tue May 09, 2006 10:06 pm Post subject: |
|
|
| probe1 wrote: | Which OS?
If your IP is represented in an environment variable, you can get it with this
| Code: |
myIP = Environ("IPADDRESS")
|
Does this help? |
it helps me a lot.
My OS is WinXP
can i use command like ipconfig in macro to get my IP address?
I want to write a macro to show a dialog like that when you open a document which save with password , you have to type the password to see the content.
I use a database and check IP address (or computername) to replace the password.
But i have no idea when you open the document,
how to make the document stop at the IP check dialog and the context is invisible?
any help??
thanks. |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Wed May 10, 2006 12:35 am Post subject: |
|
|
What's your utlimate goal?
You can save documents with passwords and are prompted for them if opening,
so you don't have to write your own routines for psw check.
If you would like to store a given password it externally, you have to intercept saving and opening.
You can run programs or scripts (batch.dos) with basic runtime command
| Code: | | Shell( myProgram.exe ) | (see F1)
which enables you to write a batch to run ipconfig (or whatever) and set variables (export them) or redirect output. _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
Teme General User


Joined: 03 May 2006 Posts: 8 Location: Finland
|
Posted: Wed May 10, 2006 12:46 am Post subject: |
|
|
As soon as you call external program you lose possibility to move the macro somewhere else. Is using beanshell out of questions? With Java you can get ip-address really easily.
Teme |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Wed May 10, 2006 12:05 pm Post subject: |
|
|
| as a java laymen: How do you get your IP in Java ? |
|
| Back to top |
|
 |
Teme General User


Joined: 03 May 2006 Posts: 8 Location: Finland
|
|
| Back to top |
|
 |
|