avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday July 15, 2024, 10:59 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Yaron [ switch to compact view ]

Pages: [1]
Developer's Corner / VBS: Select one file in a folder
« on: July 18, 2017, 10:48 AM »

The following code selects arg1 in a Windows Explorer folder:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("""" & WScript.Arguments(0) & """")
WScript.Sleep 400

' objShell.SendKeys("^a{F5}") ' Deslect All.

Set objShellAPP = CreateObject("Shell.Application")
On Error Resume Next ' For new unsaved files.
With objShellAPP.Windows(objShellAPP.Windows.Count - 1).document
.SelectItem .Folder.Items.Item(WScript.Arguments(1)), 17
End With

Set objShell = Nothing
Set objShellAPP = Nothing

If fileA is already selected in the folder and fileB is passed as arg1, both files are selected.

How can I have fileA deselected and only fileB selected?
The commented line
is a workaround, but there must be a better way.

Thank you.

Developer's Corner / Set a VBS file encoding
« on: July 15, 2017, 11:32 AM »

I use the following code in a BAT file to open a folder and select a file in an existing Windows Explorer window (QTTabBar installed).

start "" %1

SET TempVBSFile=%temp%\~tmpSendKeysTemp.vbs

ECHO Set tSK = CreateObject("WScript.Shell") >> "%TempVBSFile%"
ECHO WScript.Sleep 200 >> "%TempVBSFile%"
ECHO tSK.SendKeys "^q%~2" >> "%TempVBSFile%"

CSCRIPT //NoLogo "%TempVBSFile%"

DEL /F /Q "%TempVBSFile%"

How can I change the temp VBS file encoding from the BAT file?

I'd appreciate your help.

Developer's Corner / Apply changes in Registry immediately
« on: July 03, 2015, 03:42 PM »

The following code (in a Firefox extension) toggles the value of the "FontSmoothing" Registry-Key.

Code: Javascript [Select]
  1. let regFontSmooth = Components.classes[";1"].createInstance(Components.interfaces.nsIWindowsRegKey);
  2., "Control Panel\\Desktop", regFontSmooth.ACCESS_ALL);
  3. regFontSmooth.writeStringValue("FontSmoothing", regFontSmooth.readStringValue("FontSmoothing") == 0 ? 2 : 0);
  4. regFontSmooth.close();

How do I apply the changes immediately (without a reboot or restarting Windows Explorer?

Thank you.

Post New Requests Here / Command line - Some questions
« on: April 01, 2014, 06:18 PM »
I've created a batch file for zipping selected items in a folder.
(The file is placed in 'Send to').

If I use the following code:
for %%* in (.) do set CurrentFolder=%%~n* "C:\Program Files\WinRar\WinRar" a -afzip "%CurrentFolder%.xpi"

    The file name is that of the current folder (correct).
    All files are archived whether I select one file or multiple files (wrong).
    Selected folders are not archived (wrong).

If I use the following code:
set file=%~f1 "C:\Program Files\WinRar\WinRar" a -afzip "%file:~0,-4%.xpi" "%1"

    The file name is that of the file on which I right click (correct).
    Only that file is archived even if multiple files are selected (wrong).

How can I know if a single item is selected or more?
What's the condition syntax?
How can I include folders in the archive?

Thank you.

Post New Requests Here / Add to archive "FileName.xpi"
« on: March 26, 2014, 06:41 PM »
I use WinRar.

In Options > Settings > Integration > User defined archive extensions, I've associated XPI and JA files with the program.

I would like to add the following entries to Windows Explorer's context menu:

1) Add to archive "FileName.xpi"
2) Add to archive "FileName.ja"

I'd like the entries to appear below the default "Add to archive ''", and also the compression format to be in my zip settings.


If you know of another Archiver with which I could achieve that, please let me know.

(Win 7, 32 bit).

Thank you.

Pages: [1]