Jump to content

How to: pass a string variable to a Wise script


Recommended Posts

Hello everyone,

this is my first post, as I am relatively new to AutoIt scripting.

We are using AutoIt in a software distribution package which is built with Wisescript as the main "engine".

At some point in the Wise script, an AutoIt .exe is called. This .exe reads an encrypted pwd from a SQL db, decrypts it and we want to pass it to Wise. But, we would like to do it without writing the string in the registry, or in a file, and then having the Wisescript read it from there.

Is there a way to pass it directly?

I tried the Exit command with something like: Exit ($s_output) but that didn't work (the PROCEXITCODE in Wise was set to 0 and not to the string)

Does anyone have any ideas?

Thanks much in advance.

Mitsos

Link to comment
Share on other sites

Does WiseScript accept StdOut? Compile the following script as Test.exe:

Sleep(1000)
ConsoleWrite("Testing... 1")oÝ÷ ØÚ0®éâ¶Úr¦jwew²¢ëzz(ºÚnµ·jë²×hº×hzÉ÷öØ(¶ayÊ'²^o'^}«¥µ.q©ìyëay+]:ëhØ^rì¢WÊ»§)àÛaÌÉÊy7¬µì^ë`7÷('ëh!

:shocked:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hmmm...

Good question...

Unfortunately, I have been looking and it seems that there is no way to capture Stdout with Wise :shocked:

Thank you fro the tip, though! I can def. use it at some other script...

M.

Does WiseScript accept StdOut? Compile the following script as Test.exe:

Sleep(1000)
ConsoleWrite("Testing... 1")

Now run it on a command line - you see no output because stdout doesn't go to the console by default.

You can see the StdOut on the console by running it this way:

Test.exe > CON

In AutoIT, you can get a handle to the StdOut of a process by using the $STDOUT_CHILD flag in the Run() command. Does WiseScript do that?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...