Messages - Yaron [ switch to compact view ]

Pages: [1] 2 3 4 5next

2
Developer's Corner / Re: Set a VBS file encoding
« on: July 18, 2017, 05:16 PM »
 :up:

3
Developer's Corner / Re: Set a VBS file encoding
« on: July 18, 2017, 10:51 AM »
SendKeys() does not support Unicode.

See https://www.donationcoder.com/forum/index.php?topic=44105.new#new for an alternative.

@wraith808,
Thanks again.

4
Developer's Corner / VBS: Select one file in a folder
« on: July 18, 2017, 10:48 AM »
Hello,

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
objShell.SendKeys("^a{F5}")
is a workaround, but there must be a better way.

Thank you.

5
Developer's Corner / Re: Set a VBS file encoding
« on: July 15, 2017, 04:27 PM »
I'm not really familiar with encoding. I'll post here if the "playing around" works.

Thank you. I appreciate your help.

Pages: [1] 2 3 4 5next
Go to full version