Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
foreach f files ...counter
#1
i hope thats not a stupid question from me,
but what is the shortest way to get foreach count?


Function cmd_prompt
Trigger ^Shell_menu "cmd here" 0x11 "" "" "open cmd prompt with selected path"     Help - how to add the trigger to the macro
Code:
Copy      Help
function $files
str f

foreach f files
,_i+1
,if _i<2
,,out f
,,;ChDir f ;;obsolete?
,,SetCurDir f
,,run "cmd.exe"
,else
,,out "doh!"


// cmd.exe
;spe -1
;str d="d:\downloads"
;str p.from("/k cd d:\downloads")
;ChDir d
;run "cmd.exe"
;RunConsole("c:\" "cd d:\downloads")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)