Script(Ver1.90対応版)
IndexScriptグローバルのメソッドGlobal method

Global method
You can write as it is without writing an object.

Method(General)
createObject( str )
Create object.
echo( str )
Show message box.
message( str [, num] )
Show message box.
num corresponds to the second parameter of MsgBox of vbs. (V1.04)
num is optional.
question( str )
Show ask dialog of YES or NO. Get result by return value.
input( str1, str2 )
Show input dialog.(V1.46)
str1 is the message text.
str2 is the default content of the input field.
The return value is the string entered.
prompt( str1, str2 )
Alias for the same function as input.(V1.46)
beep()
Sound a beep.
endMacro()
Stop script execution.
command( str )
Command execution by command name.
Reference:Command list
contextMenu( str1 [, str2] )
Execute the item of the context menu.(V1.02)
Check the context menu of the selected file for a match with the string of str1.
(Example : "&Extract")
Or check the matching verb string.
(Example : "copy")
In the case of a submenu, specify the submenu name in str1 and the item name in str2.
backgroundContextMenu( str1 )
Execute the item of background context menu, like a contextMenu() method.(V1.52)
sendTo( str [, num [, num2] ] )
Send selected file to path.(V1.02)
str specifies the path.
If it is not an absolute path, examine the file in %userprofile%\SendTo.
If num is 1, copy it.
If num is 2, move it.
If num is 3, create a link.
If num is 4, it is automatic.
num is optional.

If num2 is 1, it is drop to folder by mouse right button.
num2 is optional.
selectAll()
Command of "Select All".
cut()
Command of "Cut".
copy()
Command of "Copy".
paste()
Command of "Paste".
pasteLink()
Command of "Paste Shortcut".
rename( strBase [, strExt] )
Execute "Rename (multi)" command equivalent with parameter specification.(V1.24)
strBase is file name part.
strExt is extension part.
This is different from the "Rename" command.
renameReplace( strSearch, strReplace [, numOption] )
Execute "Rename (replace)" command equivalent with parameter specification.(V1.74)
open( str [, num1 [, num2 [, num3] ] ] )
Open the path of str.
It is also possible to write "*".Filter format/regexp format
It is also possible to describe the file name.

num1 is a specification such as a new tab.
num1 is optional.
0: Open normally
1: New tab
2: New tab (existing is active)
3: New tab (at the background)
4: New tab (at the background / existing is no action)
5: New split
6: Open normally (existing is active)
7: New window (V1.44)
If 7 is specified, script execution will not continue in the new window, but will continue in the original window.

num2 specifies tab insertion position.
num2 is optional.
0: Add to right edge 1: Add to left edge 2: Insert right: 3: Insert left

num3 specifies how to expand the tree's subfolders.
num3 is optional.
0:Default 1:Not expand 2:Expand
refresh( [num] )
Command of "Refresh".
When 1 is specified to num, it is equivalent to "Refresh (focus)" command. (V1.01)
When 2 is specified to num, it is equivalent to "Refresh (file list is difference)" command. (V1.50)
When 3 is specified to num, it is equivalent to "Refresh (tree is difference)" command. (V1.50)
When 4 is specified to num, it is equivalent to "Refresh" command and keep selection. (V1.50)
getClipboard()
Returns the clipboard contents in text format. (V1.24)
setClipboard( str )
Copy text to clipboard in text format.
getDirectory()
Return the current folder (current directory) path.
setDirectory( str )
Set the current folder (current directory) path.
addBookmark( str1, str2 [,str3 [, num1] ] )
Add to bookmarks.
str1 is the display name. str2 is the path. str3 is the path and index of the icon (eg "hmfilerclassic.exe, 1").
num1 is the link bar display value.
0: Icon and text 1: Icon only 2: Text only 3: Do not display
getFocusTarget()
Returns the type of window currently in focus.
1: File list
2: Folder pane (or each tab folder pane)
0: Other than that
getKeyState( num1, num2 )
Gets the keyboard status.
Specify a virtual key code in num1. (Example: 0x10 for VK_SHIFT / 0x11 for VK_CONTROL / 0x04 for VK_MBUTTON)
When num2 is 0 it is the same as GetKeyState of Win32 API.
When num2 is 1, you can get the state of the middle button when you press a button such as the link bar.
When num2 is 2, it is the same as GetAsyncKeyState of Win32 API.
The return value is whether the 0x8000 bit is pressed or not. A bit of 0x0001 represents the toggle state of the key.
expandFolder( str[, num1 [, num2] ] )
Expand / collapse folder tree without selecting. (V1.01)
str is the target path.

num1 is the expansion method. (Bitwise OR of the following values)
0x01: Scroll to enter the screen
0x02: Collapse subfolders
0x04: Equivalent to expansion with "*" on the numeric keypad

num2 is num1 depth when 0x04 is specified.
Expand to the specified depth.
Default is equivalent to 2, and when deployment is complete, drill down one hierarchy at a time.
sleep( num )
Wait for a fixed time (ms). The CPU does not stop, but if there is asynchronous processing, it is processed during that time.
getWildcard()
Returns the current filter (wildcard). (V 1.03)
There is no setWildcard. The setting can be set as open("*.xxx");.
getClipboardFiles()
If the file is copied to the clipboard, returns an array of file paths. (V 1.03)
If the clipboard is a content other than a file (such as text), the number of elements in the array will be less than or equal to 0 (0 or -1).
It will fail if a place without a path (such as "computer") is copied.
An array is an array of type SAFEARRAY.
Example:
varSafeArray = getClipboardFiles();
objArray = varSafeArray.toArray();
numFiles = objArray.length; //Elements
strPath = objArray[0]; //Element 0〜numFiles-1
isClipboardFormatAvailable( num or str )
Returns whether the content copied to the clipboard is valid. (V1.46)
Specify the clipboard format number with num or the clipboard format string with str.
Typical values are as follows.
Text: 13
File or folder (where there is a path): 15
File or folder (with or without path): "Shell IDList Array"
menu( str1, ... )
Display the menu. (V1.24)
Specify the menu item as a string in the parameter.
Up to 32 pieces.
If a menu item is selected, the item number counted from 1 is returned.
If not selected, 0 is returned.
If you write "&" in front of the key alphanumeric characters, that character becomes the key. For example, if "Item (&A)", "A" will be the key.
When using as a separator, use "\ x01" as the character string. (in the case of js)
To use a submenu, write "\ x01" followed by the menu name of the submenu. (1.40 or later)
Subsequent items will be items in the submenu. Specifying "" means the end of the submenu.
Example for js
menu(
"\x01Sub menu A",
"Item A-1",
"Item A-2",
"",
"\x01Sub menu B",
"Item B-1",
"Item B-2",
"",
"Item C"
);
menuArray( array [, num ] )
Display the menu. (V1.24)
Specify the menu item in the array.
Specify the menu item name in the array for the first parameter.
In the second parameter, specify the number of elements of the array. The second parameter can be omitted.
Return value and separator are the same as Menu method.
It is an array of the type SAFEARRAY.
Example:
varDic = createObject("Scripting.Dictionary");
varDic.add(0, "AAA");
varDic.add(1, "BBB");
varDic.add(2, "CCC");
varSafeArray = varDic.items();
menuArray( varSafeArray );
Or, you can use JavaScript array.(V1.78)
Example:
a=[];
a[0]="a1";
a[1]="b2";
a[2]="c3";
menuArray( a );
getSpaceSelectMode()
Gets whether it is space selection mode. (V1.26)
setSpaceSelectMode( num )
Change the space selection mode. (V1.26)
getArg( num )
Get the argument specified by command line option /a. (V1.30)
When there are multiple /a, specify the number counted from 0.
Example: "C:\Program Files\HmFilerClassic\HmFilerClassic.exe" /x "c:\folder\test.js" /a param1 /a "param 2"
When executing a script with bookmarks, you can specify parameters by separating the script file name with a space. Get that parameter with GetArg. (V1.44)
Example: js:"c:\folder\test.js" param1 "param 2"
findWindow( strClass, strTitle [, numOption] )
If numOption is 0, same as FindWindow of Win32API.
If numOption is 1, returns the window handle of the window that matches part of the class name or title.
findWindowEx( numHwndParent, numHwndChildAfter, strClass, strTitle )
Same as FindWindowEx of Win32API.
getWindow( numHwnd, num )
Same as GetWindow of Win32API.
isWindowVisible( numHwnd )
Same as IsWindowVisible of Win32API.
isWindow( numHwnd )
Same as IsWindow of Win32API.
getWindowText( numHwnd )
Like GetWindowText of Win32API.
getCurrentWindowHandle()
Get current window handle.
getStaticVariable( strName [, numOption ] )
Get static variable.
setStaticVariable( strName, strData [, numOption ] )
Set static variable.
setAttentionBar( str )
Set the attention bar contents.(V1.76)
browseFile( str1 [, str2] )
Show browse file dialog.(V1.78)
str1 is the directory.
str2 is the wildcard.
The return value is the string entered.
loadTextFile( strFile )
Load text file and return text.(V1.78)
loadDll( str )
Loads the DLL equivalent of Hidemaru Editor's loaddll.(V1.56)
Return the DllFuncManager object.
Method(File list)
getView()
Get View value.
0:Details 1:List 2:Icon 3:Tile 4:Thumbnails
setView( num )
Set View by value.
0:Details 1:List 2:Icon 3:Tile 4:Thumbnails
sort( num1 or str1 [,num2] )
Do sorting.

When specifying numerically with num1:
0: Name 1: Size 2: Type 3: Update date and time

When specifying string with str1:
"name" / "size" / "type" / "date"
Or column name (property name).

num2 is the sort direction.
0: Reverse 1: Ascending 2: Descending
If num2 is specified and str1 is specified as "", the current sort column is targeted. (V1.01)
getItemCount()
Return the count of items in the file list.
getSelectedCount()
Returns the selected item count.
getNextItem( num1, num2 )
Returns the index of the next item that corresponds to the status flag specified by num2.
If num1 is -1, the first hit is returned.
If num1 is 0 or more, the next hit at the specified index is returned.
Example:
First selection item : iSel = getNextItem(-1, 2);
First focus item : iFocus = getNextItem(-1, 1);
getItemState( num )
Returns the status flag of the item at index num.
Bitwise OR of the following values
0x01: Focused, 0x02: Selected, 0x04: New file (when the color setting is valid)
getItemText( num1 [, num2] )
Returns the text of the item at index num1.
num2 is a subitem. (optional).
getItemPath( num )
Returns the path of the item at index num.
isFolder( num )
Returns whether the index item of num is a folder.
getColumnCount()
Returns the count of columns in details view.
getColumnText( num )
Returns the column item name (name of property) of the details view of the index of num.
selectItem( num1 or str1 [, num2] )
When string is specified in str1:
It behaves the same as the "Find and Select ..." command.
Search and select after the current focus.
If multiple items hit, select in order.
Clear the selection when it is the last item.
If num2 contains 0x02, select the exact match item including the extension, not the same as the "Find and Select ..." command.
num2 specifies the method to select. (Bitwise OR of the following values)
0x01: Add selection
0x02: Perfect match to the file name (even if the extension is not displayed) (V1.01)
0x10: Do not target files (V 1.42)
0x20: Do not target folder (V 1.42)
In the case of wildcards in str1:
In the case of wildcard specification, multiple selection with wildcards.
num2 specifies the method to select. (Bitwise OR of the following values)
0x01: Add selection
0x10: Do not target files (V 1.42)
0x20: Do not target folder (V 1.42)
In case of numeric specification with num1:
Selection of index specification.
num2 specifies the method to select.
0x01: Add selection
customFileList( strFileName )
Outputs the contents of the text file to the file list as search results.(V1.54)
getThumbnailSize( numType )
Get thumbnail size.(V1.54)
If numType is 0, default size.
If numType is 1, each folder size.
setThumbnailSize( numSize, numType )
Set thumbnail size.(V1.54)
numSize is thumbnail size.
If numType is 0, default size.
If numType is 1, each folder size.
Method(Tab)
getTabBarCount()
Gets the count of tab bars. (V1.01)
It is not tab mode when 0. Tab mode is 1 or more. When the tab is splitted, it becomes 2 or more.
getTabCount( [num] )
Gets the count of tabs. (V 1.03)
If split, num specifies which split. Count left / top split from 0.
If you specify -1 as num, it returns the count of tabs of the split currently in focus.
If you specify -2 for num, it returns the count of tabs that totaled all splits.
If omitted, it is the same as -2.
getTabState( num1, num2 )
Gets the state of the tab. (V1.04)
num1 is the tab number.
The tab number is the serial number of all splits, counting from zero.
num2 specifies the type of return status.
0 is the lock status, 1 is the close prohibition status, and 2 is the parent path for each tab (if it is set).
getCurrentTab( [num] )
Gets the number of the currently active tab. (V 1.03)
If split, num specifies which split. Count left / top split from 0.
If you specify -1 as num, it returns the index number of tab of the split currently in focus.
If you specify -2 for num, it returns the index number of tab that totaled all splits.
If omitted, it is the same as -2.
getTabName( num1 [, num2] )
Gets the name of the tab specified by num1. (V1.28)
The tab number is the serial number of all splits, counting from zero.
Specify 1 in num2 to get the tab path. (V1.46)
setTabName( str, num1 )
Sets the name of the tab specified by num1. (V1.54)
setActiveTab( num )
Activate the specified tab. (V1.28)
The tab number is the serial number of all splits, counting from zero.
closeTab( num )
Closes the specified tab. (V 1.42)
The tab number is the serial number of all splits, counting from zero.
It will fail for locked tabs.
In the case of the last one tab, it fails.
If it is not locked, 1 is returned. If it is locked, 0 is returned.
closeOtherTab()
Close all other tabs.
It also closes the locking tab.