How to get an IM command to the console and run?
How to get an IM command to the console and run?
I have a vbscript written that takes instructions from a table and generates an IM command. I need to now run the IM command automatically- I thought I had this solved using .bat files but that won't work. Any ideas? I understand that there is some wip code for v7 happening, but a solution is needed sooner than the release date. Thanks
Re: How to get an IM command to the console and run?
I've tried that and many variations, and nothing works- it's a common theme that those commands do nothing in the threads I have read through (and I have tried probably 40 iterations of it). I think the big issue may be setting permissions, and to have loose permissions that allow .bats to run does not seem like a good idea. Is there an alternative to a bat file?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to get an IM command to the console and run?
I'm not sure what you are asking. But I don't know VBscript, so I probably wouldn't know the answer.
Pasting this into a file called test.vbs ...
... then typing "test.vbs" at the command prompt works for me.
(Note: IM is an environment variable that points to a location for convert.exe.)
Pasting this into a file called test.vbs ...
Code: Select all
Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("cmd /c %IM%convert -version")
Do While Not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadLine()
Wscript.Echo strText
Loop
(Note: IM is an environment variable that points to a location for convert.exe.)
snibgo's IM pages: im.snibgo.com
Re: How to get an IM command to the console and run?
The thing I am trying to avoid is typing into the command line, I would rather have some automation of that part (I know this isn't the ideal forum to ask but so far the search has been fruitless). Basically vbscript generates the IM command which then *poof* runs in the console. I may have to look into some 3rd party software for a hot folder utilitythen typing "test.vbs" at the command prompt works for me.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to get an IM command to the console and run?
Well, something has to kick off the process: an image file is dropped on to a file, or into a directory, or something else. The file could be a BAT, C program or (I suppose) a VBS. For a directory, you could have a daemon program in C that autostarted on power-up then did nothing until receiving an interrupt from a directory change.
But such mechanisms are not feasible from within IM, the subject of these forums.
But such mechanisms are not feasible from within IM, the subject of these forums.
snibgo's IM pages: im.snibgo.com