I had a look through old forum postings plus the help file info on command line switches but couldn't see any way to achieve this.
Is there any way to make TextPad open a file in binary mode. I had hoped that a shortcut in the sendto menu, coupled with a command line switch might have allowed this.
I realise that it can be done by associating file types, but I really wanted a general purpose viewer.
Opening TextPad in binary mode
Moderators: AmigoJack, bbadmin, helios, MudGuard
- SteveH
- Posts: 327
- Joined: Thu Apr 03, 2003 11:37 am
- Location: Edinburgh, Scotland
- Contact:
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Looking through the help (for command and then select Command Line Parameters), at least for 4.7.1 shows the following, none of which seem to be what you're looking for.
Parameter Description
-av Arrange windows vertically tiled.
-ah Arrange windows horizontally tiled.
-ac Arrange windows cascaded.
-am Arrange windows maximized.
-ca Open any specified file name parameters in the ANSI code set.
-cd Open any specified file name parameters in the DOS code set.
-i Start minimized (iconized).
-l# User interface language, where # is: 7=German, 9=English, 10=Spanish, 12=French, 16=Italian, 17=Japanese, 21=Polish, 25=Russian.
-m Start another instance, regardless of the setting for "Allow multiple instances".
-ol Set landscape orientation for printing.
-op Set portrait orientation for printing.
-p "file" Print the specified file using default printer.
-q Don't display startup "splash" message.
-r Open any files in the command line as read only.
-s Started by a DDE shell command.
-t "title" Append "title" to the main window title bar.
-u filename Open the file, whose name can contain spaces, but does not need to be quoted.
@filename Open all the files that are listed, one per line, in the specified file. This overrides the option to load the workspace, specified on the General page of the Preferences dialog box.
Parameter Description
-av Arrange windows vertically tiled.
-ah Arrange windows horizontally tiled.
-ac Arrange windows cascaded.
-am Arrange windows maximized.
-ca Open any specified file name parameters in the ANSI code set.
-cd Open any specified file name parameters in the DOS code set.
-i Start minimized (iconized).
-l# User interface language, where # is: 7=German, 9=English, 10=Spanish, 12=French, 16=Italian, 17=Japanese, 21=Polish, 25=Russian.
-m Start another instance, regardless of the setting for "Allow multiple instances".
-ol Set landscape orientation for printing.
-op Set portrait orientation for printing.
-p "file" Print the specified file using default printer.
-q Don't display startup "splash" message.
-r Open any files in the command line as read only.
-s Started by a DDE shell command.
-t "title" Append "title" to the main window title bar.
-u filename Open the file, whose name can contain spaces, but does not need to be quoted.
@filename Open all the files that are listed, one per line, in the specified file. This overrides the option to load the workspace, specified on the General page of the Preferences dialog box.
I choose to fight with a sack of angry cats.
- CyberSlug
- Posts: 120
- Joined: Sat Oct 04, 2003 3:41 am
Try this to open the active file in Binary mode. Create a user-defined tool:
- Command: AutoIt3.exe
- Parameters: "binaryMode.au3"
- Command: AutoIt3.exe
- Parameters: "binaryMode.au3"
Code: Select all
; binaryMode.au3 Script that extracts the filename from
; English TextPad titlebar and then opens the file in Binary Mode
;
; Philip "CyberSlug" Gump - 11 November 2003
; Tested on (English version of) TextPad 4.72 and requires AutoIt v3
AutoItSetOption("SendKeyDelay",1) ;speed things up; default is 10 ms
$title = WinGetTitle("TextPad","") ;title of active TextPad window
If StringInStr($title, "*") Then
MsgBox(0, "Error", "File is not saved!")
Exit
EndIf
$fileName = StringTrimRight( StringTrimLeft($title, 11), 1)
WinMenuSelectItem("TextPad", "", "&File", "&Close") ;close the file
WinMenuSelectItem("TextPad", "", "&File", "&Open") ;reopen...
Send($fileName,1)
ControlCommand("Open", "", "ComboBox4", "SelectString" ,"Binary")
ControlFocus("Open", "", "Buton2") ;choose the Open button
ControlLeftClick("Open", "", "Button2") ;click the Open button
Exit