#๐ quick question
89 messages ยท Page 1 of 1 (latest)
@wheat pelican
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
It looks like a discord link
Yah, that's funny, you're cool just maybe space it or something
discord :// -/message-requests
ok
ty
basically I'm trying to execute a url protocol in python
i tried with os.system but it doesnt work
the stackoverflow post suggested that i use start <x> but it doesnt look like i can provide the extra url params
A url isn't a command
That os.system is to run commands (executables), just like you would at your command prompt/shell
Fair
I don't work with discord's APIs so I'm not really familiar with this stuff.
nah but like
What are you trying to accomplish?
this is for any URL protocol
discord is just an example
at the moment im trying to run a roblox protocol
roblox-player://placeId=1
and it automatically launches roblox to that place ID
Well then you need to determine which application can interpret those URLs
Wait
'Run a Roblox protocol': what do you mean by this? You want to open a webpage to a url?
And then figure out how to launch that program passing it that URL
hold look
are u saying that essentially these URL parameters
are just like
params to the executable?
Well, I'm not sure on the implementation details to be frank
What do you expect to happen with that roblox-player://placeId=1 example?
I think explorer.exe should be able to handle the URL iirc
It will read the registry and find the correct handler based on the protocol
and it works with web browsers
But it's not platform agnostic
Yes, you could open chrome <url>, for instance
i only need it to work on windows
If you run 'explorer.exe [URL]'
Yeah I think that should work
I said chrome
Tbh, I'm not sure you're going to accomplish what you want to accomplish, but: once you figure out how to do it manually, then you can use os.system. Both Roblox and discord have api's.
Try running this from.the command kine
And not the run box
i tried later in the video
tried run box, tried start explorer.exe roblox://placeId=1, tried os.system("explorer.exe roblox://placeId=1")
Ah mb
Try 'start' not 'explorer'
start roblox://placeId=1?
Sure, try it from command prompt
But you never tried start with os.system
Start is equivalent to run, explorer is the file explorer (not same as run)
I was about to learn the internal ways Run works and ShellRunDialog and shit and then I didnt do the simplest option ๐ญ
Ty
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.