Create an icon to begin a script?

JRF

Member
Hi, all. I am trying to find a way to put some sort of icon on my PI workspace that begins a script. I have put my most used process icons into the workspace, but have yet to figure out how to do a similar thing for scripts. Weary of having to sort through the scripts directory every time I need one! Any help appreciated. Thanks.

JRF
 
if the script in question has a little triangle at the lower left of the script UI, you can drag the triangle to the desktop. this will create a process icon which references the script and saves how it was configured at the moment you dragged the triangle. if you double-click that process icon, it will open a process called "Script", which is kind of a bridge between processes and script. pushing the round button (global apply) will start the script with all the arguments contained in the script process.

if the script does not have a little triangle, you can still bring up the Script process, reset it, clear the MD5 sum, and then use the file folder button to navigate to the location of the script. (src/scripts/, inside of the folder where pixinsight is installed, which differs by operating system.)

or you can use the $PXI_SRCDIR variable, for instance:

$PXI_SRCDIR/scripts/FFTRegistration/FFTRegistration.js

so that you don't have to worry about the exact path to where PI is installed.

rob
 
if the script in question has a little triangle at the lower left of the script UI, you can drag the triangle to the desktop. this will create a process icon which references the script and saves how it was configured at the moment you dragged the triangle. if you double-click that process icon, it will open a process called "Script", which is kind of a bridge between processes and script. pushing the round button (global apply) will start the script with all the arguments contained in the script process.

if the script does not have a little triangle, you can still bring up the Script process, reset it, clear the MD5 sum, and then use the file folder button to navigate to the location of the script. (src/scripts/, inside of the folder where pixinsight is installed, which differs by operating system.)

or you can use the $PXI_SRCDIR variable, for instance:

$PXI_SRCDIR/scripts/FFTRegistration/FFTRegistration.js

so that you don't have to worry about the exact path to where PI is installed.

rob
Actually, I'd like to be able to do this too (for a script without a little triangle). But I don't understand your explanation, I'm afraid. What is a MD5 sum?
 
the bottom text field at the top of the script process contains the MD5 checksum of the script file in the file path box above it.

an MD5 sum is a "hash", sometimes called a digest, or a summary, which is a large-ish number that tries to uniquely identify a much larger number or collection of numbers (like a text file, or any file on the computer which behind the scenes is just a long list of numbers.) the point being that if you change just one byte or even one bit of the underlying file, the MD5sum will be a completely different number. this lets you identify that a file has been changed in some way. for instance a software installer might come with the MD5sum of the installer file. you download the file and then run the md5sum program on your end, and if you get a different number, then someone has tampered with the original installer.

PI tries to check the script on disk against the MD5sum it calculated the last time it ran the script to help you check if somehow the contents of the script have changed. but you can override the check by clearing out the MD5 box by clicking the little tab with the X.

rob
Screen Shot 2022-03-29 at 12.06.16 PM.png
 
the bottom text field at the top of the script process contains the MD5 checksum of the script file in the file path box above it.

an MD5 sum is a "hash", sometimes called a digest, or a summary, which is a large-ish number that tries to uniquely identify a much larger number or collection of numbers (like a text file, or any file on the computer which behind the scenes is just a long list of numbers.) the point being that if you change just one byte or even one bit of the underlying file, the MD5sum will be a completely different number. this lets you identify that a file has been changed in some way. for instance a software installer might come with the MD5sum of the installer file. you download the file and then run the md5sum program on your end, and if you get a different number, then someone has tampered with the original installer.

PI tries to check the script on disk against the MD5sum it calculated the last time it ran the script to help you check if somehow the contents of the script have changed. but you can override the check by clearing out the MD5 box by clicking the little tab with the X.

robView attachment 14219
Sorry but I still don't understand. What I am trying to do is make an icon for a script (EZ Denoise in fact) to add to the workspace with my process ones. But since script doesn't have a little triangle how do I do this? You said bring up the script process. But when I do that I don't see what you're seeing. I see this (screenshot). So how do I make that into an icon?
 

Attachments

  • Capture.JPG
    Capture.JPG
    519 KB · Views: 114
that is the script itself. the Script process is in the process menu. just edit the file path to point to the EZDenoise.js file, and clear out the MD5sum. when you execute the script process it should launch EZDenoise. if you drag the triangle of the Script process to the workspace, you'll have the icon.

if EZdenoise had the triangle you would not have to go through this rigamarole. you could create the icon directly...

rob
 
that is the script itself. the Script process is in the process menu. just edit the file path to point to the EZDenoise.js file, and clear out the MD5sum. when you execute the script process it should launch EZDenoise. if you drag the triangle of the Script process to the workspace, you'll have the icon.

if EZdenoise had the triangle you would not have to go through this rigamarole. you could create the icon directly...

rob
I'm not seeing the EZDenoise.js file in the scripts folder. Would it be someplace else?
1648662902601.png
 
when you execute it from the menu, if you look in the console you should see PI printing out the full pathname of the script right before it starts execution of the script.

for whatever reason, darkarchon has called this script file RistaMask_UI.js instead of EZ_Denoise as it is called inside the script.

rob
 
when you execute it from the menu, if you look in the console you should see PI printing out the full pathname of the script right before it starts execution of the script.

for whatever reason, darkarchon has called this script file RistaMask_UI.js instead of EZ_Denoise as it is called inside the script.

rob
Aha! Thanks :)
 
Back
Top