run & winexist 問題 請大家指教

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: run & winexist 問題 請大家指教

Re: run & winexist 問題 請大家指教

Post by garry » 27 Sep 2018, 10:38

Code: Select all

#warn
setworkingdir,%a_scriptdir%
Settitlematchmode,2
SetKeyDelay,20,20
sc=ahk_exe notepad.exe
IfWinNotExist,%sc%
 Run,notepad,,,
IfWinNotActive ,%sc%,,WinActivate,%sc%
WinWaitActive,%sc%
Sleep 400
ControlSend ,,Some text`nNext line`n, %sc%
return

run & winexist 問題 請大家指教

Post by adrian_9832 » 26 Sep 2018, 20:41

以下是小弟的 CODE 請問如何才可以生效?

Run, Notepad.exe

IfWinExist, 未命名 - 記事本
{
WinActivate
WinMaximize
Send, Some text.{Enter}
return
}

return

Top