Page 23 of 23

Re: AutoRun LWMenu

Posted: Sat Aug 31, 2024 9:56 am
by -ElCoyot-
lwc
Hi. Can you compile the code that is responsible for "blinktaskbarwhendone" into an executable file

Re: AutoRun LWMenu

Posted: Fri Sep 06, 2024 6:20 am
by lwc
Not sure I understand, just use:

Code: Select all

[CUSTOM MENU]
skiptobutton=1

[BUTTON1]
buttontext=Your Program
relativepathandfilename=yourprogram.exe
blinktaskbarwhendone=1

Re: AutoRun LWMenu

Posted: Fri Sep 06, 2024 8:18 am
by -ElCoyot-
You didn't understand. I need a compiled exe file with the taskbar flashing function. That is, run the exe and the panel will blink.

Re: AutoRun LWMenu

Posted: Fri Sep 06, 2024 10:45 pm
by lwc
To be clear, are you asking for a file unrelated to my launcher? And for this file to just blink and exit?

If so, how about I'll just let you define skiptobutton as 0, and will make it launch and exit the launcher immediately (but will trigger post-actions like blinktaskbarwhendone)?

Code: Select all

[CUSTOM MENU]
skiptobutton=0
blinktaskbarwhendone=1
Let me know that's what you want and I'll do it.

Re: AutoRun LWMenu

Posted: Sat Sep 07, 2024 12:52 am
by -ElCoyot-
I just need a piece of Autoit code that contains the "blinktaskbarwhendone" function, but compiled into an exe file.

Re: AutoRun LWMenu

Posted: Sat Sep 07, 2024 4:15 am
by lwc
This is an unusual request, since it's not really related to either this thread or this program, it's more of a private request.
Where am I supposed to host this program? Here's a temp link for the 64-bit version.
If this is because you don't want to use autorun.inf, how about letting me add the aforementioned feature and then use it like:

Code: Select all

AutoRun_x64.exe /skiptobutton=0 /blinktaskbarwhendone
The code itself is:

Code: Select all

$taskbartitle = "[CLASS:Shell_TrayWnd]" ; for when needing to blink the taskbar when done
$taskbartext = "" ; for when needing to blink the taskbar when done
$taskbarbuttons = "[CLASS:MSTaskListWClass]" ; for when needing to blink the taskbar when done

ControlHide($taskbartitle, $taskbartext, $taskbarbuttons)
sleep(100)
ControlShow($taskbartitle, $taskbartext, $taskbarbuttons)

Re: AutoRun LWMenu

Posted: Sun Nov 03, 2024 12:03 pm
by sl23
Hey there! Back again! :)
I have an issue that I think AuroRunMenu can help resolve.
I have made a Rainmeter skin that uses *.lnk files to launch games. Trouble is, these LNK files are a pita to edit. I've looked everywhere for a LNK editor and can only find two I can work with:
LinkEditorGUI is an AutoIT program that looks good but doesn't work for me, keeps crashing.
Shortcuts Search and Replace is ok but awkward to use, never shows all my shortcuts in a single folder and is hard to figure out imo.
So then I thought about AutoRunMenu (ARM)!

So my plan...
Spoiler!   
1. Create a menu with as many items as necessary, ie, one per game, with portable links to them. With the games and ARM on the same drive, I can use relative paths and arguments.
2. Create a standard shortcut to launch those menu items. Which should be a little easier to edit. This will be placed on a separate drive and launch ARM's specific menu items depending on the shortcut parameters. This, I am assuming is quite easy to set up and more importantly, easier to edit should the need arise.
Example:
Spoiler!   
Here's the current Shortcut file properties:
LNK Target: "D:\Emulators\BizHawk\EmuHawk.exe" "E:\Sega\MCD - Syndicate\Syndicate (Europe).cue"
LNK Start in: "D:\Emulators\BizHawk"

I need to set up a menu entry in AutoRun.inf for this game to launch when clicked on.
Then I need to set up a shortcut.lnk file to run the menu and starts this particular entry, is that correct?

I'm a bit rusty on ARM workings now, is that how would I set up a menu item with this particular game?
My solution:
Spoiler!   
I have this code as Button 1:

Code: Select all

[BUTTON1]
buttontext=MCD - Syndicate
closemenuonclick=1
relativepathandfilename=D:\Emulators\BizHawk\EmuHawk.exe
optionalcommandlineparams="E:\Sega\MCD - Syndicate\Syndicate (Europe).cue"
This is working ok. I'm trying to figure out the best layout for all this though. So I can set it up to use relative paths as much as possible. The only way I can think to do so is to have ARM, Roms and the emulators all on the same drive, which currently they aren't.
As my main reason for this is to try and make as many of these paths relative, I'm wondering if I can use:
optionalcommandlineparams="..\Sega\MCD - Syndicate\Syndicate (Europe).cue"
I assume that windows won't resolve this to an absolute path and that I am forced to use Absolute paths here?

Is that a feasible solution do you think?
If anyone should know of a better way or a LNK editor feel free to point that out. ;)

One more question I have though... Is it possible to set an icon to use for each menu button? It would be great if there was a way to allow an icon to be set. So each shortcut.lnk file would read the AutoRun.inf and see it's path to the icon. But I guess that then becomes a windows issue and is out of the reach of ARM?

Thanks.

Re: AutoRun LWMenu

Posted: Sun Nov 03, 2024 1:36 pm
by rbon
sl23
about 'Link editor' I have see the program 'Shortcuts Search and Replace' rel. 2.4.0:
Dev Stuff by Jacqueline Potier: http://jacquelin.potier.free.fr/Shortcu ... ndReplace/
• download 32 bit: http://jacquelin.potier.free.fr/exe/Sho ... ce_bin.zip
• download 64 bit: http://jacquelin.potier.free.fr/exe/Sho ... _bin64.zip
• Shortcuts Search And Replace Portable rel. 1.14.0: https://portableapps.com/apps/utilities ... e-portable

I hope that help You.

Re: AutoRun LWMenu

Posted: Sun Nov 03, 2024 1:43 pm
by sl23
Thanks, but no. I tried it and it really isn't working properly for me.

Sorry, but are you able to answer my questions above when you have the time.
Specifically:
I'm wondering if I can use:
optionalcommandlineparams="..\Sega\MCD - Syndicate\Syndicate (Europe).cue"
I assume that windows won't resolve this to an absolute path and that I am forced to use Absolute paths here?
And...
Is it possible to set an icon to use for each menu button? It would be great if there was a way to allow an icon to be set. So each shortcut.lnk file would read the AutoRun.inf and see it's path to the icon. But I guess that then becomes a windows issue and is out of the reach of ARM?
Thanks. :D

Re: AutoRun LWMenu

Posted: Mon Nov 04, 2024 5:21 am
by Midas
:arrow: FYI, there's an old topic on the issue of portable shortcuts (i.e., filesystem links): viewtopic.php?t=26071.

Re: AutoRun LWMenu

Posted: Mon Nov 04, 2024 8:12 am
by sl23
Ok thanks Midas! ;)
I did locate that through an internet search, but couldn't be assed to figure out if it worked with arguments such as:
Target: "E:\Emulators\Dolphin_sps\Dolphin.exe" --e "D:\Games\GameCube\Wii - Sonic 4 - Episode 1.wad" -b -u "E:\Emulators\Dolphin_sps\User"

For my questions, I found an answer to the first... Relative paths do work here for the optionalcommandlineparams= which is fantastic!

The second question was only resolved by using the shortcut.lnk option to select an icon. It's not relative though which is what I wanted. So if there's a way of doing this, I would be glad to know!

Thanks...

Re: AutoRun LWMenu

Posted: Mon Nov 04, 2024 3:13 pm
by lwc
All settings support relative folders, including relativepathandfilename= :D

As for icons, do you mean if there are 5 buttons inside one menu, you would want 5 icons, one next to each button? But that would mean you'll have to store those icons as files and use something like icon=file1.png, no?

BTW, remember you can skip the menu via skiptobutton=X which can be defined either in autorun.inf or in a separate shortcut (/skiptobutton=X).

Re: AutoRun LWMenu

Posted: Mon Nov 04, 2024 4:01 pm
by sl23
Thanks :)

I created an Autorun.inf like this:

Code: Select all

[CUSTOM MENU]
singlerun=1

[BUTTON1]
buttontext=MCD - Microcosm
closemenuonclick=1
relativepathandfilename=..\BizHawk\EmuHawk.exe
optionalcommandlineparams="..\..\..\..\Documents\Games\Sega\MCD - Microcosm\Microcosm (Europe).cue"

[BUTTON2]
buttontext=MCD - Syndicate
closemenuonclick=1
relativepathandfilename=..\BizHawk\EmuHawk.exe
optionalcommandlineparams="..\..\..\..\Documents\Games\Sega\MCD - Syndicate\Syndicate (Europe).cue"
Then created two shortcuts like this:
"D:\Emulators\- ARM\AutoRun_x64.exe" /skiptobutton=2

I set the icon using the Windows LNK option "Change Icon", but was wondering if I could use a relative path to do so. Can't be done. At first, I meant using a separate icon, then realised I could just point it to the EXE file. Which I settled with.

Re: AutoRun LWMenu

Posted: Tue Nov 05, 2024 8:11 am
by sl23
I just had an idea, not sure what you would think about it, whether it's useful in other situations or not? Maybe it's too much coding to add to AutoRunMenu?

As I often code in Rainmeter, one of it's most useful things is the use of the [Variables] section. Are you familiar with this?

It allows you to specify a repeating string, path, value, or anything that just repeats and then use the name of that variable in the code so should you need to change it, you only change it in one place. But it also helps you avoid retyping the same text.

Here's an example from my current situation:
I have a working AutoRun.inf like this...

Code: Select all

[CUSTOM MENU]
singlerun=1

[BUTTON1]
buttontext=MCD - Syndicate
closemenuonclick=1
relativepathandfilename=..\BizHawk\EmuHawk.exe
optionalcommandlineparams="..\..\..\..\Documents\Games\Sega\MCD - Syndicate\Syndicate.cue"

[BUTTON2]
buttontext=PCE - Loom
closemenuonclick=1
relativepathandfilename=..\BizHawk\EmuHawk.exe
optionalcommandlineparams="..\..\..\..\Documents\Games\Sega\PCE - Loom.cue"

[BUTTON3]
buttontext=PCE - Ys Book 1+2
closemenuonclick=1
relativepathandfilename=..\BizHawk\EmuHawk.exe
optionalcommandlineparams="..\..\..\..\Documents\Games\Sega\PCE - Ys Book 1+2.cue"
It would be really handy to be able to do this instead:

Code: Select all

[Variables]
Path1=..\BizHawk\EmuHawk.exe
Path2=..\..\..\..\Documents\Games\

[CUSTOM MENU]
singlerun=1

[BUTTON1]
buttontext=MCD - Syndicate
closemenuonclick=1
relativepathandfilename=#Path1#
optionalcommandlineparams="#Path2#Sega\MCD - Syndicate\Syndicate.cue"

[BUTTON2]
buttontext=PCE - Loom
closemenuonclick=1
relativepathandfilename=#Path1#
optionalcommandlineparams="#Path2#Sega\PCE - Loom.cue"

[BUTTON3]
buttontext=PCE - Ys Book 1+2
closemenuonclick=1
relativepathandfilename=#Path1#
optionalcommandlineparams="#Path2#Sega\PCE - Ys Book 1+2.cue"
Notice that where the path is supposed to be in a Button, I have replaced it with the Variables name as #Path1# or #Path2#. In Rainmeter, the paths, or Variables to be more accurate, are resolved internally before passing to Windows.

Do you like the idea, or is it expecting too much? My reason for suggesting it is that I have several hundred items to add, so this would be far easier when it comes to changing them if the need arises. :D