OS_Process & Windows

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

OS_Process & Windows

Rick Draper
Hi All,
 
I was certain I had something similar working in the past, but find that
I can't come up with the correct syntax.
 
On the command line, the following works... i_view32.exe d:\test.jpg
/info=d:\test.txt /fullinfo
 
Attempting this with OS_Process does not return the required results in
any of the variety of methods I have tried...

var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
/info=d:/test2.txt /fullinfo' )); $os->close;
 
var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',
'/info=d:/test2.txt', '/fullinfo' )); $os->close;

var('os') = os_process( 'd:/irfanview/i_view32.exe',
Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
 
All suggestions sincerely appreciated.
 
Very best regards,
 
Rick

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

stevepiercy
Suggest trying the shell tag, which provides an easier interface
to os_process with helpful error messages for troubleshooting.  
Make sure to download its dependency:
http://tagswap.net/shell
http://tagswap.net/response_localfolder/

I assume that you can get a simple command to work?
http://old.nabble.com/OS_process-authentication-td22242341.html#a22242471

--steve


On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:

>Hi All,
>
>I was certain I had something similar working in the past, but find that
>I can't come up with the correct syntax.
>
>On the command line, the following works... i_view32.exe d:\test.jpg
>/info=d:\test.txt /fullinfo
>
>Attempting this with OS_Process does not return the required results in
>any of the variety of methods I have tried...
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
>/info=d:/test2.txt /fullinfo' )); $os->close;
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',
>'/info=d:/test2.txt', '/fullinfo' )); $os->close;
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe',
>Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>
>All suggestions sincerely appreciated.
>
>Very best regards,
>
>Rick
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

Rick Draper
Thanks, Steve.

Yes, I can get basic ECHO and DIR type commands to work fine.

What would be the syntax to feed all that is required into Shell?

shell('d: && cd/irfanview && i_view32.exe d:/test.jpg /info=d:/test2.txt
/fullinfo');

Very best regards,
 
Rick

 

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Steve
Piercy - Web Site Builder
Sent: Wednesday, 10 March 2010 1:59 PM
To: Lasso Talk
Subject: Re: OS_Process & Windows

Suggest trying the shell tag, which provides an easier interface to
os_process with helpful error messages for troubleshooting.  
Make sure to download its dependency:
http://tagswap.net/shell
http://tagswap.net/response_localfolder/

I assume that you can get a simple command to work?
http://old.nabble.com/OS_process-authentication-td22242341.html#a2224247
1

--steve


On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:

>Hi All,
>
>I was certain I had something similar working in the past, but find
>that I can't come up with the correct syntax.
>
>On the command line, the following works... i_view32.exe d:\test.jpg
>/info=d:\test.txt /fullinfo
>
>Attempting this with OS_Process does not return the required results in

>any of the variety of methods I have tried...
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
>/info=d:/test2.txt /fullinfo' )); $os->close;
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',
>'/info=d:/test2.txt', '/fullinfo' )); $os->close;
>
>var('os') = os_process( 'd:/irfanview/i_view32.exe',
>Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>
>All suggestions sincerely appreciated.
>
>Very best regards,
>
>Rick
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/ 
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

JP-14
In reply to this post by stevepiercy
Aren't Windows filepaths supposed to have BACKslashes example:  \  rather than forward slash  /  ?  I thought forward slashes meant option or switches?"

jp


On Mar 9, 2010, at 9:59 PM, Steve Piercy - Web Site Builder wrote:

> Suggest trying the shell tag, which provides an easier interface to os_process with helpful error messages for troubleshooting.  Make sure to download its dependency:
> http://tagswap.net/shell
> http://tagswap.net/response_localfolder/
>
> I assume that you can get a simple command to work?
> http://old.nabble.com/OS_process-authentication-td22242341.html#a22242471
>
> --steve
>
>
> On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:
>
>> Hi All,
>>
>> I was certain I had something similar working in the past, but find that
>> I can't come up with the correct syntax.
>>
>> On the command line, the following works... i_view32.exe d:\test.jpg
>> /info=d:\test.txt /fullinfo
>>
>> Attempting this with OS_Process does not return the required results in
>> any of the variety of methods I have tried...
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
>> /info=d:/test2.txt /fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',
>> '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe',
>> Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>> All suggestions sincerely appreciated.
>>
>> Very best regards,
>>
>> Rick


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

Rick Draper

The correct syntax can be a little inconsistent - for example, the
absolute path for writing a log file in windows through Lasso would be
Log('C://Logs/LassoLog.txt').

An old post from Paul Higgins (march 2007) on Lasso talk shows the
syntax
OS_Process( 'C:/Program Files/gs/gs8.54/bin/gswin32c.exe', blah blah
blah.

I have tried many (possibly all) variations and am hoping that someone
has the answer.


Very best regards,
 
Rick

 

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of JP
Sent: Wednesday, 10 March 2010 2:45 PM
To: Lasso Talk
Subject: Re: OS_Process & Windows

Aren't Windows filepaths supposed to have BACKslashes example:  \
rather than forward slash  /  ?  I thought forward slashes meant option
or switches?"

jp


On Mar 9, 2010, at 9:59 PM, Steve Piercy - Web Site Builder wrote:

> Suggest trying the shell tag, which provides an easier interface to
os_process with helpful error messages for troubleshooting.  Make sure
to download its dependency:

> http://tagswap.net/shell
> http://tagswap.net/response_localfolder/
>
> I assume that you can get a simple command to work?
> http://old.nabble.com/OS_process-authentication-td22242341.html#a22242
> 471
>
> --steve
>
>
> On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:
>
>> Hi All,
>>
>> I was certain I had something similar working in the past, but find
>> that I can't come up with the correct syntax.
>>
>> On the command line, the following works... i_view32.exe d:\test.jpg
>> /info=d:\test.txt /fullinfo
>>
>> Attempting this with OS_Process does not return the required results
>> in any of the variety of methods I have tried...
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
>> /info=d:/test2.txt /fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',

>> '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe',
>> Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' ));
>> $os->close;
>>
>> All suggestions sincerely appreciated.
>>
>> Very best regards,
>>
>> Rick


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

stevepiercy
In reply to this post by Rick Draper
What is the path to i_view32.exe?  Commands run relative to the
Lasso file which uses [shell], but the executable can be called
from anywhere by using its full pathname.

'cd/irfanview' is not a valid command and should return an
error.  'cd /irfanview' navigates from the system root to the
directory 'irfanview'.

Assuming the location of the .exe is '/irfanview/i_view32.exe',
these should work:

Command line:
/irfanview/i_view32.exe d:\test.jpg /info=d:\test.txt /fullinfo

Shell:
shell('/irfanview/i_view32.exe d:\test.jpg /info=d:\test.txt /fullinfo');

I don't know what the executable actually does, but I assume you
would look for the file test.txt at the root of the d: drive as
confirmation that the command works.

--steve


On 3/10/10 at 2:27 PM, [hidden email] (Rick Draper) pronounced:

>Thanks, Steve.
>
>Yes, I can get basic ECHO and DIR type commands to work fine.
>What would be the syntax to feed all that is required into Shell?
>
>shell('d: && cd/irfanview && i_view32.exe d:/test.jpg /info=d:/test2.txt
>/fullinfo');
>
>Very best regards,
>
>Rick
>
>
>
>-----Original Message-----
>From: Lasso Talk [mailto:[hidden email]] On Behalf Of Steve
>Piercy - Web Site Builder
>Sent: Wednesday, 10 March 2010 1:59 PM
>To: Lasso Talk
>Subject: Re: OS_Process & Windows
>
>Suggest trying the shell tag, which provides an easier interface to
>os_process with helpful error messages for troubleshooting.  
>Make sure to download its dependency:
>http://tagswap.net/shell
>http://tagswap.net/response_localfolder/
>
>I assume that you can get a simple command to work?
>http://old.nabble.com/OS_process-authentication-td22242341.html#a2224247
>1
>
>--steve
>
>
>On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:
>
>>Hi All,
>>
>>I was certain I had something similar working in the past, but
>>find that I can't come up with the correct syntax.
>>
>>On the command line, the following works... i_view32.exe
>>d:\test.jpg /info=d:\test.txt /fullinfo
>>
>>Attempting this with OS_Process does not return the required results in
>
>>any of the variety of methods I have tried...
>>
>>var('os') = os_process( 'd:/irfanview/i_view32.exe',
>>(:'d:/test.jpg /info=d:/test2.txt /fullinfo' )); $os->close;
>>
>>var('os') = os_process( 'd:/irfanview/i_view32.exe',
>>(:'d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>>var('os') = os_process( 'd:/irfanview/i_view32.exe',
>>Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>>All suggestions sincerely appreciated.
>>
>>Very best regards,
>>
>>Rick
>>
>>--
>>This list is a free service of LassoSoft:
>>http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>-- --
>Steve Piercy               Web Site Builder              
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

Rick Draper
 
Thanks, Steve - I had a re-typing error with the directory change...

But after a few more combinations and permutations, using your code as
the base, the following works...

shell('/irfanview/i_view32.exe d:\\test.jpg /info=d:\\test_lasso.txt
/fullinfo');

This actually extracts all the EXIF data (and then some) from images
after upload.

Very best regards,
 
Rick

-------------------
From the generated file...

[test.jpg]
File name = test.jpg
Directory = d:\
Compression = JPEG
Resolution = 0 x 0 DPI
Image dimensions = 1536 x 2048  Pixels (3.15 MPixels) (3:4)
Print size = 54.2 x 72.2 cm; 21.3 x 28.4 inches
Color depth = 16,7 Millions   (24 BitsPerPixel)
Number of unique colors = 185702
Disk size = 1.42 MB (1,484,414 Bytes)
Current memory size = 9.00  MB (9,437,224 Bytes)
File date/time = 25/02/2010 / 07:26:04

- EXIF -
Make - Apple
Model - iPhone 3GS
Orientation - Right top
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
Software - 3.1.3
DateTime - 2010:02:22 23:13:33
YCbCrPositioning - Centered
ExifOffset - 206
ExposureTime - 1/10 seconds
FNumber - 2.80
ExposureProgram - Normal program
ISOSpeedRatings - 1016
ExifVersion - 0221
DateTimeOriginal - 2010:02:22 23:13:33
DateTimeDigitized - 2010:02:22 23:13:33
ComponentsConfiguration - YCbCr
ShutterSpeedValue - 1/10 seconds
ApertureValue - F 2.80
MeteringMode - Average
Flash - No flash function
FocalLength - 3.85 mm
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 2048
ExifImageHeight - 1536
SensingMethod - One-chip color area sensor
ExposureMode - Auto
White Balance - Auto
Sharpness - Normal
GPS information:
GPSLatitudeRef - N
GPSLatitude - 43  38.81  0
GPSLongitudeRef - W
GPSLongitude - 79  23.26  0
GPSAltitudeRef - Sea level
GPSAltitude - 58 m
GPSTimeStamp - 23  13  32.64
GPSImgDirectionRef - True direction
GPSImgDirection - 234.46
Thumbnail:
Compression - 6 (JPG)
Orientation - Right top
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
JpegIFOffset - 872
JpegIFByteCount - 8355

 

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Steve
Piercy - Web Site Builder
Sent: Wednesday, 10 March 2010 3:19 PM
To: Lasso Talk
Subject: Re: OS_Process & Windows

What is the path to i_view32.exe?  Commands run relative to the Lasso
file which uses [shell], but the executable can be called from anywhere
by using its full pathname.

'cd/irfanview' is not a valid command and should return an error.  'cd
/irfanview' navigates from the system root to the directory 'irfanview'.

Assuming the location of the .exe is '/irfanview/i_view32.exe', these
should work:

Command line:
/irfanview/i_view32.exe d:\test.jpg /info=d:\test.txt /fullinfo

Shell:
shell('/irfanview/i_view32.exe d:\test.jpg /info=d:\test.txt
/fullinfo');

I don't know what the executable actually does, but I assume you would
look for the file test.txt at the root of the d: drive as confirmation
that the command works.

--steve

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: OS_Process & Windows

Steffan A. Cline
In reply to this post by stevepiercy
Or just use [passthru]. It's far easier and most people say it's faster. If
you need a windows version, I have it but without an installer. I can
package up the manual and the module.


Thanks

Steffan

---------------------------------------------------------------
T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
Steffan A. Cline  
[hidden email]                             Phoenix, Az
http://www.ExecuChoice.net                                  USA
AIM : SteffanC          ICQ : 57234309
YAHOO : Steffan_Cline   MSN : [hidden email]
GOOGLE: Steffan.Cline             Lasso Partner Alliance Member
---------------------------------------------------------------



> From: Steve Piercy <[hidden email]>
> Reply-To: Lasso Talk <[hidden email]>
> Date: Tue,  9 Mar 2010 19:59:13 -0800
> To: Lasso Talk <[hidden email]>
> Subject: Re: OS_Process & Windows
>
> Suggest trying the shell tag, which provides an easier interface
> to os_process with helpful error messages for troubleshooting.
> Make sure to download its dependency:
> http://tagswap.net/shell
> http://tagswap.net/response_localfolder/
>
> I assume that you can get a simple command to work?
> http://old.nabble.com/OS_process-authentication-td22242341.html#a22242471
>
> --steve
>
>
> On 3/10/10 at 1:16 PM, [hidden email] (Rick Draper) pronounced:
>
>> Hi All,
>>
>> I was certain I had something similar working in the past, but find that
>> I can't come up with the correct syntax.
>>
>> On the command line, the following works... i_view32.exe d:\test.jpg
>> /info=d:\test.txt /fullinfo
>>
>> Attempting this with OS_Process does not return the required results in
>> any of the variety of methods I have tried...
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg
>> /info=d:/test2.txt /fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe', (:'d:/test.jpg',
>> '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>> var('os') = os_process( 'd:/irfanview/i_view32.exe',
>> Array('d:/test.jpg', '/info=d:/test2.txt', '/fullinfo' )); $os->close;
>>
>> All suggestions sincerely appreciated.
>>
>> Very best regards,
>>
>> Rick
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Steve Piercy               Web Site Builder
> Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/