QB64 Phoenix Edition
Chat with Me -- HOST - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: Chat with Me -- HOST (/showthread.php?tid=1262)

Pages: 1 2 3 4 5 6 7


RE: Chat with Me -- HOST - Kernelpanic - 12-13-2022

(12-13-2022, 07:00 PM)Pete Wrote: The one you posted with START does work for me...

Example:
Code: (Select All)
SHELL _HIDE _DONTWAIT "notepad" ' Doesn't launch.
BEEP: SLEEP
SHELL _HIDE _DONTWAIT "start notepad" ' Launches because of START.
BEEP: SLEEP

_HIDE causes the first one not to launch, but adding "start" in the second example allows it to launch Notepad.

I'd like to buy the explanation that _HIDE prevents the cmd.exe console form launching an app, but I don't believe that is so, because...

For me it is exactly the opposite!  Big Grin

[Image: Start-Notepad2022-12-13-221040.jpg]


RE: Chat with Me -- HOST - Pete - 12-13-2022

(12-13-2022, 09:23 PM)Kernelpanic Wrote:
(12-13-2022, 07:00 PM)Pete Wrote: The one you posted with START does work for me...

Example:
Code: (Select All)
SHELL _HIDE _DONTWAIT "notepad" ' Doesn't launch.
BEEP: SLEEP
SHELL _HIDE _DONTWAIT "start notepad" ' Launches because of START.
BEEP: SLEEP

_HIDE causes the first one not to launch, but adding "start" in the second example allows it to launch Notepad.

I'd like to buy the explanation that _HIDE prevents the cmd.exe console form launching an app, but I don't believe that is so, because...

For me it is exactly the opposite!  Big Grin

[Image: Start-Notepad2022-12-13-221040.jpg]



What OS are you running?

I'm running Windows 10, 64-bit.

Pete


RE: Chat with Me -- HOST - Kernelpanic - 12-13-2022

Quote:Pete - What OS are you running?

I'm running Windows 10, 64-bit.

I also. Latest update. -- This is how Notepad starts for me:

Code: (Select All)
Shell _Hide _DontWait "D:\Programme\notepad++" ' Doesn't launch.
Beep: Sleep
'Shell _Hide _DontWait "start D:\Programme\notepad++" ' Launches because of START.
Beep: Sleep

Programming is a nice hobby.


RE: Chat with Me -- HOST - Pete - 12-13-2022

Interesting. Same OS and you can only get one of those two SHELL calls to work, while I can start my Notepad++ either way...

Code: (Select All)
Shell _Hide _DontWait "start C:\Windows\notepad++"

and

Code: (Select All)
Shell _Hide _DontWait "C:\Windows\notepad++"

Both work for me.

Now interesting that on my system, Notepad (not ++, just notepad) and Firefox can both be called without a drive and path, but Notepad++ requires the drive and path. The file finding ability is a nice feature of SHELL but again, it is not always reliable. It may have something to do with how the various apps are registered in the registry.

Anyway, the difficulty isn't so much getting whatever you need to work on your device, it's getting them to work, as intended on all devices.

Pete


RE: Chat with Me -- HOST - Kernelpanic - 12-13-2022

Quote:Anyway, the difficulty isn't so much getting whatever you need to work on your device, it's getting them to work, as intended on all devices.


That is the way it is! In principle it is like that in almost everything.




RE: Chat with Me -- HOST - mnrvovrfc - 12-14-2022

(12-13-2022, 10:06 PM)Pete Wrote: Interesting. Same OS and you can only get one of those two SHELL calls to work, while I can start my Notepad++ either way...

Code: (Select All)
Shell _Hide _DontWait "start C:\Windows\notepad++"

and

Code: (Select All)
Shell _Hide _DontWait "C:\Windows\notepad++"

Both work for me.

You're the first person I see online that copies a "foreign" program into "Windows" directory! Instead of creating a directory right under the user's home directory like I have done. Could have had something like:

Code: (Select All)
Shell _Hide _DontWait "C:\Users\wabbit\myprogs\notepad++.exe"

Yet it works; the point is to avoid spaces in directory and file names wherever possible. Also Pete, you're only doing what is expected normal on Linux: the application executable is usually installed into "/usr/bin" so that directory has thousands of files and it becomes a mother to check them out with a file manager.


RE: Chat with Me -- HOST - mnrvovrfc - 12-14-2022

I made the test for "_SHELLHIDE" function, and discovered now there is no such thing as "_SHELLDONTWAIT". Notice the failed attempt to compile with "_SHELLDONTWAIT".

Notice that even with "_SHELLHIDE" a dummy console window is shown. But this might be on my 10-year-old laptop and it would help if I had the latest QB64PE. (It's proof that I am doing almost nothing on Windows since the beginning of summer, too busy Linux distro-hopping LOL.) In order to get the user program to display the return value of "x", I closed NPPP, then opened it again to show the source code.

https://qb64phoenix.com/forum/showthread.php?tid=1257&pid=11541#pid11541

[Image: mnrvovrfc-shellhide.png]


RE: Chat with Me -- HOST - SpriggsySpriggs - 12-14-2022

SHELL _DONTWAIT or SHELL _HIDE _DONTWAIT
not
_SHELLDONTWAIT


RE: Chat with Me -- HOST - Pete - 12-14-2022

But... We used to have a keyword combo to stop Bill: _SHELDON _WAIT

Oh, and don't forget... I hatz wabbits! (Fudd Sam hybrid?)

Pete


RE: Chat with Me -- HOST - Kernelpanic - 12-14-2022

Code: (Select All)
Print Chr$(34)
Print

'If _FileExists("D:\Program Files\Notepad++\notepad++.exe") Then
'Shell "D:\" + Chr$(34) + "Program Files" + Chr$(34) + "\Notepad++\notepad++.exe tmp.three"
'Else
'Print "Cannot find notepad++"
'End If

If _FileExists("D:\Program Files\Notepad++\notepad++.exe") Then
  Shell "D:\" + " + "Program Files" + " + "\Notepad++\notepad++.exe tmp.three"
Else
  Print "Cannot find notepad++"
End If

The CHR$(34) function stands for the Ascii character >"<. If I now replace CHR$(34) with the relevant character, the error message below appears - see screenshot.
Is it correct that CHR$(34) is only intended to prevent >"< from being criticized as already existing?

[Image: CHR34-14-12-2022.jpg]