Results 1 to 3 of 3

Thread: Interfacing ThinBasic with Windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jan 2020
    Location
    France
    Posts
    11
    Rep Power
    6

    Interfacing ThinBasic with Windows

    Hello everybody.


    The TB project I'm working on today requires to open a Windows explorer by the script on certains conditions.

    The need has two cases :
    • Open explorer window and continue the script regarless of what is done in this window by the user.
    • Open explorer window and wait until user closes the window

    In the first case, the window may be closed by the user without interferring with TB script or stay active after the end of the creating script.
    Script and explorer window are completely independent.

    I used
    Pid = OS_Shell( command_exec_path & command_opt &  file_to_work_on  , %OS_WNDSTYLE_NORMAL, %OS_SHELL_ASYNC)
    
    to call a program (in this case :Acrobat_reader ) and continue execution of script.
    The script uses
     OS_ProcessKillById(PiD)
    
    to stop the program, sometimes it is unuseful as the users already closed the window.

    I also used
    %OS_SHELL_SYNC
    
    if waiting was necessary.


    NOTE:

    I noticed with 'Sysinternals-Process-explorer' that EXPLORER.EXE has only ONE instance, regardless of the number of explorer windows open.
    And when I bundle a script, at the end of succesful bundling, a popup message invites to browse the executable directory.
    If I click on 'YES' , a new process'EXPLORER.EXE' is created, independent of the explorer lauched at booting.
    Closing the window makes process die, and killing the process closes the window and nothing is done to other explorer windows

    The creator of BUNDLE could help.


    Many thanks for help.

    Justin
    Last edited by justin045; 22-11-2024 at 21:19.

Similar Threads

  1. ThinBASIC and Windows 10
    By ErosOlmi in forum thinBasic General
    Replies: 2
    Last Post: 25-01-2015, 14:31
  2. thinBasic under Windows 8
    By ErosOlmi in forum Announcements
    Replies: 2
    Last Post: 16-09-2011, 05:46
  3. thinBasic on Windows 7
    By ErosOlmi in forum Announcements
    Replies: 4
    Last Post: 12-01-2009, 16:07
  4. Interfacing Windows SDK HelloWin
    By Charles Pegge in forum Legacy
    Replies: 16
    Last Post: 04-07-2008, 15:41

Members who have read this thread: 6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •