Command: ScriptWizard (multipurpose scripting resources aid)

tbone

Commenting out those two lines fixes my problem on XP.

Regards, AB

The upcoming version will not use DOs DELETE command to delete the obsolete script if it's there. The mysterious dialogs should be history then. Thank you for investigating! o))

Updated to v0.4.4:

  • fix for the updated board-software
  • fix for script packages not extractable error

Please read the red addition in the thread-opening for update instructions. This version will use an alternative download location if updating from here fails. I'm sorry for any inconvenience, but the forum did change without me noticing an announcement or something.

Hi tbone,
Wow, you and others have been making amazing things with the script feature since DO11 came out.

Only now starting to experiment with some of the scripts. Not sure if this is directly related to ScriptWizard, but some features like "Update" are failing on my system with an error message about a semi-colon. But scripts such as SelectRandom are running properly despite the error message. Would you have any insights?

Here is a picture of the status using your columns:


Attaching the log.
Running 11.10.4 on Win7x64

Thank you in advance for any ideas. :slight_smile:
ScriptWizard.log.txt (36.8 KB)

Updated to v0.4.5:

  • fix for unescaped ampersand in faq links
  • fix for alternative download location not working (damn it! o)

Thanks for reporting! o)
There are two people involved in this error situation. Leo and me. o) Leo changed the FAQ link at the top, using an unescaped "&", which brakes the xml-parsing. But my fault is more severe of course. o) The alternative download feature, made for situations exactly like this, to provide required code adjustments, did not kick in, because I had a copy&paste error in the scripts internal id, arrg - I could eat my *ss. o)

@Leo
Would you mind editing that FAQ link? It heals SW and fixes the HTML5 validation error, which was not present before (& needs to be &).
validator.w3.org/check?uri=http% ... ne&group=0

Good night! o)

Working now. Thanks!!!
:thumbsup:

Fixed.

You're the man Leo! o) Thank you, now it's all polished and shiny again! o)
Sorry for not revisiting earlier, I was down with influenza past week, inluding delirium - I saw colorful things and such, ugh! o)

This code in v0.4.4 ..

	var deprecatedScriptPath = "Command.Generic_ScriptHelper.js";
	deprecatedScriptPath = DOpus.FSUtil.Resolve("/dopusdata\\script addins")+
			"\\"+deprecatedScriptPath;
	DOpus.NewCommand.RunCommand('DELETE QUIET FORCE "'+deprecatedScriptPath+'"');
	DOpus.NewCommand.RunCommand('DELETE QUIET FORCE "'+deprecatedScriptPath+'.txt"');

..is still causing problems in XP. Can I suggest you add a test, along the lines of:

If (DOpus.FSUtil.Exists(deprecatedScriptPath) == true) Then {perform the deletions}

Regards, AB

:slight_smile:

You can see I'm a VBScripter rather than a JScripter. The amended code (tested) would be...

	if (DOpus.FSUtil.Exists(deprecatedScriptPath)) {
		DOpus.NewCommand.RunCommand('DELETE QUIET FORCE "'+deprecatedScriptPath+'"');
		DOpus.NewCommand.RunCommand('DELETE QUIET FORCE "'+deprecatedScriptPath+'.txt"');
	}

Regards, AB

I aussie! o) Yes you're right, but the former two uploads were just hotfixes to the forum-change, they did not contain any other fixes yet.
Currently there is some translation work going on together with Kundal. After that is done, a fixed and enhanced upload will hit this place. o)

Hi @tbone

I picked up a glitch in ScriptWizard when it is invoked in a language environment that is not in the list of languages known to the Translator function in your code.


Your list of supported languages appears to be English, German, French, Italian, and Spanish whereas the OS language in my test environment is Dutch. I haven't looked closely at the code to see if there is a simple way of dealing with this situation.

Regards, AB

Thanks for telling me, reproduced! o) Quick fix: Add "du" to "this.translations", as it has been done for "en", "de" etc..
The upcoming version version will use a generic approach and not a predefined list of languages.

Special thanks again to you Leo! o)
SW versions prior to 0.4.4 are able to update as usual again, as the "meta-tag not closed" issue in the forum software has been resolved.

Hi tbone.

Have not previously checked this out. Its good stuff mate. Thanks :slight_smile:.

I have some updated scripts to upload, and would like to consider adding support for you updating process. Could you please detail what changes should be made to scripts to add support for your script helper?
I see we should include the url to the forum in our script. Also what changes should be made to the posts?

I like to include the version number in my osp/js file name. Is that a problem?

Some comments.
It seems to ignore/strip letters from the version numbers is that expected?
Might it be better for scripts to only include the post ID, and not the full url? Or perhaps your script to prevent calls to different domains.

Aside,
I notice that the an error is thrown when you click the about button in the script section of the Preferences window.

Command.Generic: ScriptWizard: Error at line 156, position 3 Command.Generic: ScriptWizard: Object not a collection (0x800a01c3)

Hi wow, thanks. o)

Just select your script in "/script addins" and run the command "ScriptWizard PREPAREUPLOAD INTERACTIVE" (or just use the menu-button provided). It "wizards" and explains you through all the necessary changes. Make sure your script is UTF16 (LE) encoded right from the start, as WSH has issues converting from/reading other encodings.

In a post, the most important thing is, to not put the version number into the uploaded filename, use the file-comment textbox instead. I'd suggest something like "v0.2 / 2015.04.02 - speed improvements, bug fix" (version / date - notes).

A version number or anything else within a filename makes it difficult to identify a matching resource for downloading by SW, there is a tolerance builtin, but you're calling for trouble with a version-string in the name, especially since SW does not change/update a local script/filename when updating (to preserve a custom sort order by filename in DOs prefs-list of scripts).

Non-numeric chars in version strings are not supported to be compliant to DOs versioning scheme.
The full URL is required, as there is the german forum as well and another one I currently use for testing purposes.

Your error is known/fixed in the next upload, which unfortunately is overdue because I keep on tweaking some bits.
Need to stop that and upload eventually. Cya! o)

Usually i have a couple of versions in there, as well as another folder where i keep old copies of scripts and packages.
I put version numbers in the files names to make it easier to manage them.
For writing scripts, how do you manage having multiple versions?

Mhh, do I keep/manage older versions, aehm no! o) I sometimes keep a seperate version as long as I improve a specific one. While doing so, I tend to rename the "stable" version to *.dis, to prevent DO from running it. If the script to be enhanced is done, I delete the *.dis version. For anyone updating a script by SW, an archived version (with version number appended) will be stored in "/script addins/archive" - in case you didn't know, so nothing get's lost. To check what versions are active and running, I use the "ScriptDetails" columns, they work in any directory and maybe they are of use for you too: Columns: ScriptDetails (update status of add-ins etc)

So, I think you can still call your old scripts the way you like, it's just the uploaded/updated version that needs to apply to the same name. Just like it is for "DOpusInstall.exe", new version - same name. It think it also helps to prevent duplicates in "/script addins", if people download scripts from here and put them to work.

Ok, cool. I have updated some scripts to include SW support. Thanks again for putting it together.

I added an icon for the main menu. Thought you might like it.
I attached the package with the icon and the latest script.