2 Questions

Discuss and share scripts and script files...
Post Reply
Ysl
Posts: 158
Joined: 03 Jan 2007 22:22

2 Questions

Post by Ysl »

Hi

I'm asking Chat GPT to do some XY scripts for me (I use User/Manage commands/Run Script with a keyboard shortcut) , sometimes it work but many time, when I execute the script with the keyborad shortcut, I get this list and I really don 't know what it means and what to do with it...(see attachment)

Also at the end of this script which create a folder, move the file to it and open the folder, I would like to know how to select the file, like if I click on it ?

Thanks for your help

Ysl
Attachments
2025-01-26 12_50_58-Window.jpg
2025-01-26 12_50_58-Window.jpg (29.38 KiB) Viewed 959 times

highend
Posts: 14050
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: 2 Questions

Post by highend »

Indent the lines…
One of my scripts helped you out? Please donate via Paypal

Ysl
Posts: 158
Joined: 03 Jan 2007 22:22

Re: 2 Questions

Post by Ysl »

Oh yes, thank you ! With a space in the front of the script I do not have this list appearing (which I still don't know what's the use of it)

Also I would like to know which script command will select the file, like if I click on it ?

highend
Posts: 14050
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: 2 Questions

Post by highend »

01. Beging your script with
setting "BackgroundFileOps", 0;

02. Activate:
Menu - Scripting - [x] Syntax Checking

03. The goto command (used with a file) will already select it
One of my scripts helped you out? Please donate via Paypal

Raf
Posts: 35
Joined: 31 Jul 2024 15:34

Re: 2 Questions

Post by Raf »

Ysl wrote: 26 Jan 2025 13:03 Hi

I'm asking Chat GPT to do some XY scripts for me (I use User/Manage commands/Run Script with a keyboard shortcut) , sometimes it work but many time, when I execute the script with the keyborad shortcut, I get this list and I really don 't know what it means and what to do with it...(see attachment)
AI is a helpful tool. It is important to remember that it is not yet capable of completing tasks independently. It may be beneficial to consider acquiring proficiency in XY language and leveraging chatGPT to assist in script development. Then you should analyse code from AI, ask it to make edits, and finally finish the script yourself. It's important to note that this is only possible if you know the nuances of the language.

Ysl
Posts: 158
Joined: 03 Jan 2007 22:22

Re: 2 Questions

Post by Ysl »

highend wrote: 26 Jan 2025 17:34 01. Beging your script with
setting "BackgroundFileOps", 0;

02. Activate:
Menu - Scripting - [x] Syntax Checking

03. The goto command (used with a file) will already select it
Thank you for your help but I'm still stuck...Maybe you could adapt my screen below to make the file moved to the created directory selected, as if y clicked on it please ?

// Récupérer le nom et le chemin complet du fichier sélectionné
$selectedFile = <curitem>;

// Récupérer le nom sans extension du fichier sélectionné, en conservant les chiffres
$fileNameNoExt = <curbase>; // Pas besoin de supprimer l'extension manuellement car <curbase> le fait déjà

// Récupérer le chemin du dossier contenant le fichier
$folderPath = <curpath>;

// Créer un nouveau dossier avec le même nom que le fichier (y compris les chiffres)
new($folderPath . "\" . $fileNameNoExt, "dir");

// Déplacer le fichier dans le nouveau dossier
moveto $folderPath . "\" . $fileNameNoExt, $selectedFile;

// Ouvrir le nouveau dossier
goto $folderPath . "\" . $fileNameNoExt;

highend
Posts: 14050
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: 2 Questions

Post by highend »

Code: Select all

setting "BackgroundFileOps", 0;
    $fileName = <curname>;
    $dstPath  = <curpath> . "\" . <curbase>;
    moveto $dstPath, <curitem>, , 2, 2;
    goto $dstPath . "\" . $fileName;
One of my scripts helped you out? Please donate via Paypal

Ysl
Posts: 158
Joined: 03 Jan 2007 22:22

Re: 2 Questions

Post by Ysl »

Perfect ! Thank you :)

Ysl
Posts: 158
Joined: 03 Jan 2007 22:22

Re: 2 Questions

Post by Ysl »

hi

thanks again for the script !

Could you add this at the end please :

press Delete
press Enter

Best Regards

ysl

highend
Posts: 14050
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: 2 Questions

Post by highend »

One of my scripts helped you out? Please donate via Paypal

Post Reply