Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string not recognized in command line
#2
something like this should work

need to format ft into other string
otherwise its just the letters ft
cant test dont have 7zip .
as an alternative you could just use qm and zip the files in regular zip format

Code:
Copy      Help
str ft
;find Windows Explorer window
int hwnd=win("" "ExploreWClass")
if(!hwnd) hwnd=win("" "CabinetWClass")
if(!hwnd) end "folder window not found"
;Get ShellBrowserWindow interface by enumerating shell windows
SHDocVw.ShellWindows sw._create
SHDocVw.ShellBrowserWindow b
foreach(b sw)
,int hwnd2=b.HWND
,err 
,,continue
,if(hwnd=hwnd2) 
,,goto g1
,;ret
;g1
;get shell folder view document
Shell32.ShellFolderView sfw=b.Document
Shell32.FolderItem fi
;enumerate selected items
foreach fi sfw.SelectedItems
,fi.Path
,ft.addline(fi.Path)
,out ft
str check.format("C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z %s" ft)
out check
out F"C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z {ft}"
;possible ways to run uncomment to test(to uncomment right click on the line number)
;RunConsole2 check
;RunConsole2 F"C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z {ft}"

also please have a look at these topics for help posting code to forum 
http://www.quickmacros.com/forum/showthr...56#pid2956
and 
http://www.quickmacros.com/forum/showthr...67#pid3267


Messages In This Thread
string not recognized in command line - by TNH - 07-23-2018, 11:29 PM
RE: string not recognized in command line - by Kevin - 07-24-2018, 12:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)