Announcement

Collapse
No announcement yet.

ShellExecute ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dominique Bodin
    replied
    Thank's to Eric, and Thierry for help..
    I'll have a try and give an answer back
    tomorow, cause i'm not at work for now.
    The soft i'm working on is a text editor
    ( one more. . .) for another langage called
    ( Euphoria ). I've used RichEdit controls ( With the help of some sources code
    found on the Forum. ) to edit the text.
    I've used another part of Forum sources to
    implement color syntaxing.
    Everythings works well at home.
    The same configuration at work ( everythings
    are the same : dirs, paths, env . . . ,the
    systems are all Win 98SE 2nd ed .).
    Then i was wondering WHY ? ? ?
    I will try the two suggestions given to me,
    and feedback after.

    Another question: during my developpement,
    of course everythings didn't work the first
    time i compiled it, then i compiled time and
    time again... Then now, when i compile the soft with PowerBasic, it compiles but doesn't
    run in the same time ( i use the compile and
    run Icone of course ! ). If i load another
    soft into PowerBasic, it compiles and run
    in a good manner !
    Someone can tell me why ?

    Great regards . . .
    Dominique Bodin.

    Leave a comment:


  • Eric Pearson
    replied
    Dominique --

    First, I don't know whether or not this is important to your basic question, but the PowerBASIC SHELL function and statement do not use the ShellExecute API.

    > But whent i try to execute the
    > prog on another computer, it
    > doesn't compile at all!

    I assume you mean that it does not run at all, correct? (If it does not compile, that is a completely different problem.)

    Do the computers use different versions of Windows? There are subtle differences in the way things like ENVIRON$ and command-line strings are processed by Windows 95/98 vs. NT/2000, so I would check to make sure the strings that are being produced by "EUDIR") + "\BIN\exw.exe " are 100.0% identical. Perhaps you could write the string to a disk file before the SHELL, to make troubleshooting easier.

    Next, if the strings are identical, the chances are good that the program is not located where the EUDIR variable says that it is. Perhaps the wrong drive letter is being used?

    And perhaps the directory name has a space in it on one machine but not the other. For example:

    Code:
    SHELL "C:\MYDIR\MYPROG.EXE  COMMANDLINE"
    ...will work but...

    Code:
    SHELL "C:\My Directory\MYPROG.EXE  COMMANDLINE"
    ...will not. Windows will see the space and try to execute C:\My with a commandline of "Directory\MYPROG... (etc.)".

    If that is the problem, you would need to enclose the program name in quotes (CHR$(34)) like this:

    Code:
    SHELL CHR$(34) + ENVIRON$("EUDIR")+"\BIN\exw.exe" + CHR$(34) + " " + zText
    -- Eric

    [This message has been edited by Eric Pearson (edited June 28, 2000).]

    Leave a comment:


  • Dominique Bodin
    started a topic ShellExecute ?

    ShellExecute ?

    Hello, i need some help about this command.
    I'm working on a text editor, with syntax colouring, and direct compilation by
    another langage called Euphoria.
    Then i try to run the compilation process
    with the function ShellExecute in this way:
    SHELL ENVIRON$("EUDIR") + "\BIN\exw.exe " & ztext
    Well, every things work very well at my
    home.
    But whent i try to execute the prog on
    another computer, it doesn't compile at all!
    The Eudir environnment variable is correctly
    set, the Path is OK ?
    At home i own two computer's, one where i
    developpe my prog, and another where i
    tested the result. Both are executing well !

    What append ? ? ? ?

    Thanks for an help.

    Dominique Bodin
    From France
Working...
X