1

I've run into an issue with a program I created using Livecode, and now I'm looking for some help from the experts. My Google-fu is strong, yet the answer eludes me...

So here's the deal. I made a very basic note-taking program for Windows only, using very noob skills. I've been using it daily for work for the past month at least. It functions exactly as it should, except for these few things that don't make sense:

  1. When loading the program, it takes 25-30 seconds to load. Not convenient considering it's pretty basic; one button and 5-6 text input fields, with the same number of label fields. And one background. The button just clears the text input fields.
  2. I started to notice a problem when I went to create a batch file to load all my work programs. When the program is loaded thru Command Prompt, if I close CMD it will close the program too. I tried the same using Powershell, and it still closes as soon as the Powershell window closes. Really really strange.

I managed to find another standalone program made with Livecode, downloaded it and tested the CMD command to see if the same thing happened. It didn't, that program loaded instantly and it is ENORMOUS. It also didn't close when I closed the CMD window. I even tried this: opened my program and the downloaded program using the same CMD session, and when I closed CMD, my program closed but the downloaded one did not.

Then, I downloaded the source code for the program that was working correctly. I created a standalone for it, and tried to open that. It acts the same way as my note program does.

I don't get it. It's got to be something in my Standalone Application Settings considering what happened in the last step I mentioned, and I've been over and over those settings for hours, but I just don't have the knowledge of LC to know what to look for. I've scoured the web looking for answers to this, but it seems to be just me having this issue (story of my life, lol).

I'll be happy to post any codes, scripts, or files needed, please let me know. I just don't know which things to post =P

Any suggestions are very much appreciated!! Thank you. =)

3 Answers3

0

don't have enough info to be able to tell what your issue is. But that much of a delay is not usual for LiveCode apps so something is definitely wrong. How long does your app take to load if you open the stackfile in the IDE?

Not sure what StackOverflow allows but if you could upload your scripts and if possible stackfile that will give us more to go on

Dave Kilroy
  • 156
  • 3
0

If you call the program from the prompt directly, e.g. using

C:\program files (x86)\your_standalone.exe

the app is treated as a command line app. I have also noticed that a LiveCode app can sometimes close if the invoking command line prompt is closed, while it may sometimes continue to run. Perhaps the handling of the relaunch message has to do with it, since this message basically handles commands from the command line.

If you want the command line process to finish independently from the invoked LiveCode application, you can use the start command:

start "" "C:\program files (x86)\your_standalone.exe"
Mark
  • 2,380
  • 11
  • 29
  • 49
  • 1
    Thanks Mark, I was using something like: start "CallNotes" "C:\Program Files\CallNotes.exe I ended up rewriting my program using VB because I couldn't figure out why it was taking 30 seconds to open, and a coworker suggested VB. My new batch file is formatted like you said: start "" "C:\Program Files\program.exe" and it works great. I don't know why this stupid comment thing won't show line breaks and keeps posting when I hit enter... it's really annoying but that's all I have to say! Also, thank you for editing out the unnecessary comment from Serenity. I still saw it in my email. – geekchic324 Mar 09 '15 at 14:50
-2

This has nothing to do with Windows, Batchfiles, or CMD.

CMD can workaround your problem, if it's a GUI program. See Start command, and read the help as it explains the starting behaviour of CMD and CMD's Start.

Explorer has different rules. Anything else that starts programs call CreateProcessExW which has it's own rules.

Mark
  • 2,380
  • 11
  • 29
  • 49
Serenity
  • 1,708
  • 2
  • 9
  • 3