Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Inexplicable behavior difference in nearly identical shortcuts

May
3,515
5
I have two desktop shortcuts which are nearly identical, see below. Both change screen size to 1024x768 using external program QRES.EXE successfully, and supposed to change screen saver timeout - the first to 1000s, the second to 15s. Only the Shortcut 2 changes the screensaver timeout. Using %+ or & in Shortcut 1 instead of ^ (my default since 4DOS for command separator) made no difference. Note that SHRALIAS is already loaded when either one is invoked, and there may be active TCC session (fully initialized, explicitly specifying the command separator character), or no TCC.

Shortcut 1

Command=F:\JPSOFT\IR\tcc.exe
Arguments=/I /H /L: /C ( F:\UTIL\qres.exe /v /x:1024 /y:768 ^ set _dummy=%@winsystem[17,1] ^ set _dummy=%@winsystem[15,1000] ^ exit )
DirectoryDescription=Set screen size to 1024x768
Link=C:\Documents and Settings\All Users\Desktop\1024 acs3.lnk
Icon=C:\WINDOWS\system32\SHELL32.dll
Offset=22
Mode=1
Hotkey=Shift-Ctrl-Alt-3


Shortcut 2

Command=F:\JPSOFT\IR\tcc.exe
Arguments=/I /H /L: /C ( F:\UTIL\qres.exe /v /x:1024 /y:768 ^ set _dummy=%@winsystem[17,1] ^ set _dummy=%@winsystem[15,15] ^ exit )
DirectoryDescription=15-s screensaver
Link=C:\Documents and Settings\All Users\Desktop\Screensaver Instant acsD.LNK
Icon=%SystemRoot%\system32\SHELL32.dll
Offset=109
Mode=1
Hotkey=Shift-Ctrl-Alt-D
 
I have two desktop shortcuts

What happens if You try the same commands at the command prompt?

What do You get if You type

echo %@winsystem[14] & echo %@winsystem[15,15] & echo %@winsystem[14]

to get previous value, change to the wished one, and get the new one?

Regards

Rodolfo Giovanninetti
 
From: Rodolfo
| Originally Posted by Steve Fabian
|| I have two desktop shortcuts
|
| What happens if You try the same commands at the command prompt?
|
| What do You get if You type
|
| echo %@winsystem[14] & echo %@winsystem[15,15] & echo %@winsystem[14]
|
| to get previous value, change to the wished one, and get the new one?

Thanks for the question. From the command line there is no problem, everything works as expected. The issue is that I want to combine two actions - change of screen resolution and change of screensaver timeout - into a single desktop shortcut, usable whether or not there is a TCC instance active. Each of my 5 similar shortcuts performs the first action correctly, but only one of them does BOTH. The other 4 require using another shortcut (not mentioned before) that correctly performs the second action alone. The question I raised was why only 1 of the 5 works correctly, but the other 4 fail to do ALL they are supposed to?
--
Steve
 
The question I raised was why only 1 of the 5 works correctly, but the other 4 fail to do ALL they are supposed to?

They aren't by any chance set to run as administrator, or under different user's credentials, are they? Screen saver settings are per-user....
 
From: Charles Dye
| Originally Posted by Steve Fabian
|| The question I raised was why only 1 of the 5 works correctly, but
|| the other 4 fail to do ALL they are supposed to?
|
| They aren't by any chance set to run as administrator, or under
| different user's credentials, are they? Screen saver settings are
| per-user....

No to both. All were created using the SHORTCUT command, which does not support "run as" or alternate credentials. I am always logged into WinXP SP3 as a user with administrator rights. All shortcuts of interest are in the "All Users" desktop directory.
--
Steve
 
Steve,

I realise that this is likely teaching my grandmother to suck eggs, but have you tried changing the parameters such that the TCC sessions remain active and visible and ECHOing the results from the @WINSYSTEM functions rather than just swallowing them?? Perhaps one of them is failing for some reason.

Alternatively, why not create a batch file that takes the relevant parameters and invokes the three commands replete with error handling that keeps the session active and unhides the window??
 
Also, have you tried delaying for a second or two after calling QRES, or launching QRES with START /WAIT? Or changing the screen-saver settings before the resolution?
 

Similar threads

Back
Top