Possible to make sketch create a shortcut in windows?

Is it possible to create a shortcut using the sketch (for linux too) or
am i somehow able to open the compiled sketch exe (bc it doesnt start, bc it needs the files in the folder?

1 Like

see How can i add a "Open with" function? - #2 by mnse

ie run.bat content:

cd /D <path_to_MySketch.exe>
MySketch.exe %1

Hope that helps …

and then start run.bat

(it has been explained)

1 Like

how do i run bat content? create a bat and paste it there? does it then also consider the files?

That’s all Win, not Linux

It’s a bit black magic.

A batch file is a txt file, just change the extension from txt to bat using rename in the local context menu.

Start by placing the bat file on your Desktop.

Paste the content in it (like working with a txt file) :

    cd /D <path_to_MySketch.exe>
    MySketch.exe %1

run bat by double clicking.


from the other thread it sounds, the Sketch works then. Haven’t tried.

Common Folder

Win can also have a few paths that it checks automatically.

That means you can

  • either enter your Sketch’s Path into Win
  • OR add a folder (for example C:\Program Files (x86)\mypath\ ) and place the batch file into it, that then open the Sketch’s folder and runs the Sketch.

How to add a folder to Win

  1. Right-click on the Start Button.
    
  2. Select “System” from the context menu.
    
  3. Click “Advanced system settings”
    
  4. Go to the “Advanced” tab.
    
  5. Click “Environment Variables…”
    
  6. Click variable called “Path” and click “Edit…”
    
  7. Click “New”
    
  8. Enter the path to the folder containing the binary you want on your PATH.
    

Chrisir

1 Like

Another bat example

@echo off

echo Hello you

REM comment 1
REM comment 2

pause

see also Can we run processing code by clicking on a icon like a desktop applications - #2 by kll