Script: Call specific help topics

Discuss and share scripts and script files...
highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

27.09.2013: Minor update
v1.0.3:
* Changed section variables to their correct order
* Added all new script commands since 17.03.2013 (up to 27.09.2013)
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

I just found myself having opened a battery of help windows. :lol:
Hence my question wether there is a feasible way to reuse an already opened help window for any subsequent lookup?
v1.0.4 will make my external viewer (just a helper application that's a slightly reduced version of my "works for multiple extensions" one) the default application. If you still want to use the script command rtfm, change line 12 to:
$useExternalViewer = 0; // Use "0" if you want to use the rtfm command instead
The external viewer will reuse an already existing XY help file window (or open a new one if none exists).
If it has to create a new one it'll use the settings defined in the "ShowHelpFile.ini" file.

E.g.:
[xys]
HelpFilePath=D:\Users\Highend\Tools\XYplorer\XYplorer.chm
Monitor=1
Left=840
Top=0
Width=840
Height=1022
HelpFilePath = path to XYplorer's .chm file
If it can't be found it'll open a dialog window to let you select it. It'll be stored
back into the .ini file afterwards.

Monitor = 1 | 2
Supports a dual (but not more than 2) monitor setup

Rest should be self-explanatory. The current values would use half the monitor width of a 1680 x resolution
and don't cover the taskbar (1050 y resolution).

You can change the values to your liking but don't modify their order!

I'll upload the new version in a few minutes (see first thread)...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Script: Call specific help topics

Post by klownboy »

Hi highend, nice update for your showhelp script. I downloaded it and was trying it out before I had read your last post (i.e., I only looked at the first post) and was wondering why after exiting the help it wouldn't go back to my previous window size. Well obviously once I read your last post I simply updated the ini file with the window size and location data I wanted and everything was fine. Thanks again.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

11.07.2014: Major update
v1.1.0:
Changed: Now all the list entries are build by extracting the .chm file
and gathering all topics & keywords by regexmatches()
A bit more about the change(s) in the starting post...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Script: Call specific help topics

Post by klownboy »

Nice update highend. I experienced an issue when performing an XY update using Simple Updater however. As has happened countless times in the past, I've forgotten and had the help file (accessed through the normal means) open when I ran the "SimpleUpdater" script. Usually though I can close the help file and continue with the update. With ShowHelpTopics v1.1.0, I wasn't abled to continue with the update after closing the help file. Could it be that "ShowHelpFile.exe" is process is open and keeping XY from being updated?

Of course once that happens, SimpleUpdater performs it's timestamp in the ini file and subsequent attempts aren't allowed because it says or thinks it's up to date. That issue should be corrected in SimpleUpdater (i.e., not to change the ini file unless the update is actually performed, which it wasn't in this case).
Thanks,
Ken

Update: On the last XY beta v14.30.0002, I ran the ShowHelpTopics and then closed it prior to commencing the update using SimpleUpdater and had no issues.
Last edited by klownboy on 12 Jul 2014 14:41, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Script: Call specific help topics

Post by Filehero »

Hi Highend,

thanks a lot for this awesome update to an awesome daily helper!

I've just installed it and quickly added one little change
ShowHelpTopics.xys, line 16 wrote:

Code: Select all

$extViewer = self("path") . "\ShowHelpFile.exe";
ShowHelpFile.ini, line 2 wrote:

Code: Select all

HelpFilePath=<xypath>\XYplorer.chm
did not work yet, so full portability is only one little step ahead.


Cheers,
Filehero

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

@Ken

The ShowHelpFile.exe only starts hh.exe with the necessary parameters and then quits (it's not waiting until the hh process ends) so I can't say why the updated process didn't work. I've never tried to update XY while having the help file open.

The best way to avoid that is to change the updater script (that kills any open XYplorer helpfile processes) before copying the new files.

@Filehero

I for myself don't store the .exe (and the .ini) file in the same place where the script resides. I'd say it's better to let the user decide (and change the script as necessary) instead of making that the default.

Code: Select all

HelpFilePath=<xypath>\XYplorer.chm
This is not as easy as it sounds. ShowHelpFile.exe is written and compiled with AutoIT, not AutoHotkey (which some kind of lacks the _IEAttach method) so I currently don't have any communication script to get that variable from XY. I plan to rewrite the whole stuff but I can't say when.
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Script: Call specific help topics

Post by Filehero »

highend wrote:I'd say it's better to let the user decide (and change the script as necessary) instead of making that the default.
Good point! I always forget about the others. :wink:
highend wrote:This is not as easy as it sounds.
Well, usabilitywise it's not even peanuts so better forget my point. Again, it was more a "if he is like me he might have could rushed it out too fast". I always forget something...


Cheers,
Filehero

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

New version published.

Code: Select all

v1.1.1
  Changed: Modified the helper application (ShowHelpFile.exe) to accept
           "<xypath>\XYplorer.chm" in the .ini File (which is now the default)
           by adding Marco's WM_COPYDATA script
  Added: Locating the helper application and storing the path inside the script
Manual editing of the script shouldn't be necessary any more (because it writes
changed variables into itself).

I've changed the default value of $extViewer (at least for this release) to
"<xyscripts>\ShowHelpFile.exe" and if it isn't there the script will ask for it's location...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Script: Call specific help topics

Post by klownboy »

Hey highend, I use "ShowHelpTopic.xys" version 1.1.1 on a daily basis, but as of yesterday, Feb 18, 2015 I started getting this error message.

Code: Select all

The system cannot find the file specified.
run
"%ComSpec%" /C COPY /Y "D:\Tools\XYplorer\XYplorer.chm" "C:\Users\ken\AppData\Local\Temp" && CD /D "C:\Users\ken\AppData\Local\Temp" && "C:\Windows\hh.exe" -decompile ~XY_CHM XYplorer.chm
I haven't touched or changed anything in the system or XY folder and XY's chm is present in the folder. The "...Local\Temp" folder also exists. Any thoughts? I don't know if a beta may have messed something up. I always get the latest.
Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

Hey Ken,

I'm not on the latest beta atm.

Open a command prompt.

Enter all commands after another and post a screenshot of it afterwards:

Code: Select all

RMDIR /S /Q "C:\Users\ken\AppData\Local\Temp\~XY_CHM"
DEL "C:\Users\ken\AppData\Local\Temp\XYplorer.chm"
COPY /Y "D:\Tools\XYplorer\XYplorer.chm" "C:\Users\ken\AppData\Local\Temp"
CD /D "C:\Users\ken\AppData\Local\Temp"
"C:\Windows\hh.exe" -decompile ~XY_CHM XYplorer.chm
Does the ~XY_CHM folder exists afterwards and has files in it?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

I've updated to .0236 (latest beta) and the script still works as it should...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Script: Call specific help topics

Post by klownboy »

Hi highend, I ran the 5 lines in sequence. The first line (rmdir) throws out the error (same error as shown above). Evidently when the folder does not exists it gives the error. If I run the last 3 lines which copies XY's chm, changes the directory and decompiles it, everything is fine as far as the looks of the temp folder and its contents, but when I run the script from the catalog it only a has a few items listed on the main page. After completion (of the 5 lines), yes everything is there in the ~XY_CHM folder. I see in the script you use SC delete to delete the folder and the chm. A normal run of Help via XY is working fine. I also loaded a new copy of the script and the exe file incase it was corrupt in some was ...same result. When I manually deleted the folder along with the chm and then run the script, I get the main script page, but like I said before, I get just a few entries like advance topics and a few @ symbols. I changed "$useExtViewer = 0" I got the same result. Very strange, especially since I've been using daily. No more time today though. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13260
Joined: 06 Feb 2011 00:33

Re: Script: Call specific help topics

Post by highend »

Delete both permanent variables (P_LASTVER & P_TOPICLIST) and try it again please.

I see no reason why the script would fail apart from a changed .chm structure.

Does anybody else have this issue?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Script: Call specific help topics

Post by klownboy »

I deleted the 2 perm variables and still received the same error message I showed above. When I get a chance I'll step through the script to see if there's something obvious. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply