Cross Reference List (XRef)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Cross Reference List (XRef)

Post by Xeo786 » 25 Mar 2021, 00:43

I have no clue what do this _ _ _ _:1 does, on line 79 :crazy:
as I am debugging it like this

Code: Select all

id := []
ex :="a"
ip :="1" 
bi :="0"
xe :=0
em := "1"
(ex="a"&&ip&&!bi&&!xe)??id[em "an AutoHotkey exe was not found!",0]:=8 _ _ _ _:1 
msgbox, % id [em "an AutoHotkey exe was not found!",0]
return
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 25 Mar 2021, 18:15

@Xeo786 I’m away from my computer for a few days, but from memory the variable _ is defined earlier in the code...
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 26 Mar 2021, 10:35

@DaveT1 On further reflection on your 1 & 2 suggestions I can see these are good ideas and could be included into XRef. I’m away from home for a short while but I’ll look into this when I get back home.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

DaveT1
Posts: 218
Joined: 07 Oct 2014, 11:23

Re: Cross Reference List (XRef)

Post by DaveT1 » 26 Mar 2021, 12:15

TAC109 wrote:
26 Mar 2021, 10:35
@DaveT1 On further reflection on your 1 & 2 suggestions I can see these are good ideas and could be included into XRef. I’m away from home for a short while but I’ll look into this when I get back home.

Cheers
YES, Yes, yes :D . Glad you think they're OK ideas, but even more pleased to hear that you're considering including them as you'll do a much better job than my post-processig scripting!!

Thank you very much :clap:

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 18 Apr 2021, 23:22

Update 19 April 2021 -
  • Created new optional 'Lone Words' list.
  • Matching AHK Gui V-variables and G-labels can now be included in the reports.
  • Improved handling of the XRef.ini file, which is used to hold default options.
  • A summary of report-changing options is now shown in the list headings.
See this page for more details, and download information.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 28 Dec 2021, 18:19

Update 29 December 2021 -
  • Can now suppress the main report when generating a 'Lone Words' list.
See this page for more details, and download information.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

DaveT1
Posts: 218
Joined: 07 Oct 2014, 11:23

Re: Cross Reference List (XRef)

Post by DaveT1 » 15 Jan 2022, 04:29

After a long time away from AUTOHOTKEY I've got back to it. Am tooling up for v2, and XRef is one tool I need. Thanks for the Lone Word List imlementation - that's great.

My Q: XRef seems to run twice? I'm just expecting it to run once on the the script I select for processing and then stop. But after producing the XRef output in Notpad, the XRef select file dialog immediately opens again. Is this to be expected / is there a way to stop this happening?

Thanks for your work on this.

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 15 Jan 2022, 17:03

The second 'Select file' dialogue appears so that you can process another script file if needed. (It is all the same run of XRef.) If you only want to process one script, just cancel when you see the second 'Select file' dialogue.

If you always want to process a script with the same options, you can set these up as a default (for that specific script, or overall). Then, to generate an XRef for that script automatically, just drag and drop the script onto a previously created XRef.exe shortcut, and the cross reference will be created without further intervention. (See 'Automatic mode' in the first post of this thread.)

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

DaveT1
Posts: 218
Joined: 07 Oct 2014, 11:23

Re: Cross Reference List (XRef)

Post by DaveT1 » 17 Jan 2022, 14:51

Mnay thanks.
TAC109 wrote:
15 Jan 2022, 17:03
The second 'Select file' dialogue appears so that you can process another script file if needed. (It is all the same run of XRef.) If you only want to process one script, just cancel when you see the second 'Select file' dialogue.
Ah, right. I typically only want to process one script at a time.

I'm trying to run XRef from a script. So I guess I could get autohotkey to spot the second FileOpen dialog and automatically canel it. But if I run XRef using the RunWait command, then will I still see the second FileOpen dialog?

(I'm having problems using FileSelect to give me the name of the file to process, and then use this as a parameter to XRef in RunWait. But it seems to also affect Notepad - see viewtopic.php?f=82&t=98983 for my Q to the forum on this if you're interested),

Thanks again for your help and a great tool.

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 17 Jan 2022, 16:41

It looks like the 'Automatic Mode' would suit you best. As described under this heading in the first post of this thread, if you call XRef.exe with the script name as a parameter it will run in Automatic mode with no further input needed.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

DaveT1
Posts: 218
Joined: 07 Oct 2014, 11:23

Re: Cross Reference List (XRef)

Post by DaveT1 » 18 Jan 2022, 09:33

Perfect, many thanks. I think the forum has just helped me to solve for the right syntax for the Run command. I need to double check (was testing with notepad) and then test with XRef. Will revert in case what I find helps anyone else.

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 07 Feb 2023, 17:49

Update 07 February 2023 -
  • Can now skip words longer than a specified number.
See this page for more details, and download information.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Cross Reference List (XRef)

Post by TAC109 » 30 Apr 2023, 18:49

Update 01 May 2023 -
  • Updated picture of Options window in documentation.
  • Fixed 'Auto-Include' links in documentation.
  • Made download link more reliable.
See this page for more details, and download information.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

Post Reply

Return to “Scripts and Functions (v1)”