Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 06:17 am

Hi,
I know how to use scratch area, send data to another EXE that has been launched and displayed. I have another thread about creating EXE's from another EXE.

But, can I write to another EXE's scratch area without having to launch and display the other EXE?

In Visual Basic, it is very easy to write data to any file without having it display on the screen.

Can we do this with SWFS?

:)


Posted by pompeyd in SWF Studio V3 on Sep 11 2008, 06:35 am


QUOTE: from fwhilton;45403
But, can I write to another EXE's scratch area without having to launch and display the other EXE?

Set the EXE to 'Start in Hidden Mode", you can then start it, send it data, write to the scratch area and then close without it ever being displayed on screen.

QUOTE: from fwhilton;45403
In Visual Basic, it is very easy to write data to any file without having it display on the screen.
You can do that too with SS - check out FileSys.appendToFile. Whether you can do this with a SS EXE in order to write to the scratch area will need to be confirmed, or denied, by Tim, Derek or AGo. I think I read on a post somewhere that you can, but I may just be :confused:

HTH

Paul


Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 08:08 am


QUOTE: from pompeyd;45405
Set the EXE to 'Start in Hidden Mode", you can then start it, send it data, write to the scratch area and then close without it ever being displayed on screen.

You can do that too with SS - check out FileSys.appendToFile. Whether you can do this with a SS EXE in order to write to the scratch area will need to be confirmed, or denied, by Tim, Derek or AGo. I think I read on a post somewhere that you can, but I may just be :confused:

HTH

Paul


Okay... that sounds good.

Another Issue.
When I close app with "Kill" it doesn't save the scratch area.

Why?

:)


Posted by pompeyd in SWF Studio V3 on Sep 11 2008, 08:41 am


QUOTE: from fwhilton;45406

When I close app with "Kill" it doesn't save the scratch area.


Try App.quit or App.forceQuit instead.


Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 08:51 am


QUOTE: from pompeyd;45408
Try App.quit or App.forceQuit instead.

Not sure how to use it in code?

I am looking at the help file and I don't see how to send it to the other EXE.
It closes my current EXE1 that it is run in and not EXE2.

:)


Posted by pompeyd in SWF Studio V3 on Sep 11 2008, 09:01 am

The code to quit goes in the 2nd EXE, and when you want it to quit send the message to do so from the 1st EXE to the 2nd.


Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 09:10 am

Okay...

I am already using one setNotify "onData" event in EXE2.

How am I going to except another (and different call) in EXE2?

If I use the same onData notify it is going to resend data.
I don't want that. The data has already gone to exe2.

I just want to sendmessage to close.

:)


Posted by pompeyd in SWF Studio V3 on Sep 11 2008, 09:32 am

What are you sending from EXE 1 to EXE 2? A String.

That String can be anything you want. So simply send a different String that you parse in the 2nd EXE. Depending on the value of the String you perform certain actions, in this case, you either quit or write to the scratch area.

How you differentiate the two is up to you - you have control of the String that is sent.

There is no need to set up a second onData event notification. The same event receives the data, checks what it is and then performs whatever action is required.


Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 09:55 am

I am sending a string already. This is the user data from the IDE (exe1). That works fine.

How my app works..

1) User clicks Create EXE button. (exe is copied and displayed)
2) User data is sent to exe2.
3) EXE1 (IDE) goes to another frame with a reset button.
4) User either closes exe2 manually or they can click a "reset" button that closes the app (this is my issue) from my IDE

- Sometimes EXE2 closes and sometimes it hangs and crashes.
- Sometimes when it succesfully closes, it doesn't save the data in the scratch area.

:)


Posted by fwhilton in SWF Studio V3 on Sep 11 2008, 10:11 am

I found out why EXE2 is freezing.

Strange... After creating EXE2, the user should click the "RESET" button to that automatically closes the exe2. But, if the user clicks on EXE1 before clicking the RESET button, then when he clicks the reset button EXE2 doesn't close and EXE2 freezes.

Now, all I have to do is figure out that issue and how to close the app to save the scratch area.

:)