I have no answer for FTP , here only DOS example with AHK
maybe can also ask in forum 'Ask For Help' :
viewforum.php?f=76
Code: Select all
;=========== EXAMPLE-1 ===============================
;- run as admin "powercfg /L |clip"
;- search for german word 'Ausbalanciert'
;- if found then write > found OK or otherwise NOT OK
;- run "powercfg /? |clip" > powercfg help
;- run textfile > %a_desktop%\%a_now%_powercfg_test.txt
;-
#SingleInstance, Force
;----------------------------------------
F1=%a_desktop%\%a_now%_powercfg_test.txt
searchfor=Ausbalanciert ;- german word
;---------------------------------------
If !A_IsAdmin
Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
Process, Priority, , H
;RunWait, %comspec% /c "powercfg -energy" ;- writes to 'energy-report.html'
RunWait, %comspec% /c "powercfg /L |clip",,hide" ;- list (without admin)
cx .= "============ powercfg LIST ========================`r`n" . clipboard ;- contains the german word > "Ausbalanciert"
if cx contains %searchfor%
cx .= "`r`ncontains " . searchfor . " so it's > OK`r`n"
else
cx .= "`r`nNOT contains " . searchfor . " so it's > NOT OK`r`n"
RunWait, %comspec% /c "powercfg /? |clip",,hide ;- help
cx .="`r`n============ powercfg HELP ========================`r`n" . clipboard
fileappend,%cx%,%f1%,utf-8
try
run,%f1%
clipboard=
cx=
return
;=====================================================
Code: Select all
;========= Example-2 =================================
/*
- run DOS with defined size/position and color
- chained command date and time and add other commands then close DOS after 5 seconds
-
*/
;-----------------------------------------------------
#warn
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
wa:=a_screenwidth,ha:=a_screenheight,W :=(wa*50)/100,H :=(ha*92)/100
e4x=
(Ltrim join&
@echo off
echo date=
date /t
echo time=
time /t
)
title2=DOS_TEST
run, %comspec% /T:0A /k "title %title2%&mode con lines=4000 cols=120&%e4x%,,,pid2
WinWait, ahk_pid %pid2%
WinMove, ahk_pid %pid2%, ,1,1,%w%,%h% ;- move DOS window to the defined position
;sleep,3000
WinWaitactive, ahk_pid %pid2%
;SendInput {text}ver`n
controlsend,ahk_parent,{text}ver`n,ahk_pid %pid2%
sleep,1000
controlsend,ahk_parent,{text}REM url=http://127.0.0.1:8889`n,ahk_pid %pid2%
sleep,100
controlsend,ahk_parent,{text}REM -- DOS quit's in 5 seconds`n,ahk_pid %pid2%
sleep,5000
controlsend,ahk_parent,{text}exit`n,ahk_pid %pid2%
return
;===================================================