Determine if running server

I need to determine is my script is running by the screen scraper server or I have run manually under the GUI. Is there anyway I can ascertain this from code?

I'm not sure I understand.

I'm not sure I understand. Do you have one instance running in workbench AND server mode simultaneously? If so, you really oughtn't. The workbench is meant for development, and can manipulate the database while running. If you change something that is being used by the server at the same time, you're inviting instability issues and possibly database corruption.

However, if that is what you're doing, there isn't really a way to tell from where the scrape was run other that server mode usually puts a log in the log sub-directory.

no not running workbench and server simultanously

hi thanks for your response. However after getting no response to an earlier problem (where I need to run scrapes via the server but I cant save a csv file to a network for some reason) I decided that when Im running scrapes via a server i would write a script that would save locally and then let my database copy the file over. However I often run the scrapes manually and wanted to avoid having to manually edit the printerwriter location in SS when doing so, I wanted to write one script that would detect if screen scraper was running in server mode or as a gui and then write the file to either the local drive or to the network drive.

is this the best way forward?

When I have had to do

When I have had to do something like that, I set a variable for "debug" and when set to true, I don't write the output, etc. In your case you could make a variable like that, and pass it in when you start from the server, but I don't know a way to detect in what mode you're running.

Invoking screen-scraper via SOAP

kerrid,

You may find what you're after using SOAP interface.

http://community.screen-scraper.com/invoking_screen-scraper_through_SOAP

-Scott