| |
|
|
Julian Schmidt | Hi, I try straight the Mainwindow, one of me erstellten Prozesses, from the "Standart-Prozess", whom Fokus zuzuweisen. the functions unfortunately not so, How I it gladly had.
momentarily do I simply by Filemap the deal the Mainwindow the Prozesses transfer and then by Setactivewindow anfokussieren. thereupon follows one Error Message (per Process). Why functions not, How of me angedacht? Can at all on Controls of others Prozessen grab? If Yes, How are correctly.?
declare prozess_id&
Windowstyle 24
Windowtitle "Hauptfenster"
Window 400,400,200,100
cls RGB(0,255,0)
print "Enter circa into Process To wechseln"
StartProzess()
User Messages 16
var hfm& = Filemap("Open", "Daten")
var daten& = Filemap("Map", hfm&)
whilenot ((%umessage=16) or iskey(27))
waitinput 30
case iskey(13) : SetActiveWindow(long(daten&,4*0))'Enter betätigt
endwhile
Process("Kill", prozess_id&, 0)
Filemap("Close", hfm&)
end
Proc StartProzess
prozess_id&=pExec("|Prozess")
Proc Process
var hfm& = Filemap("Open", "Daten")
var daten& = Filemap("Map", hfm&)
Windowstyle 24
Window 100,100-300,200
cls RGB(255,0,255)
long daten&, 4*0 = %hwnd
whilenot (%key=2)
waitinput
Endwhile
Filemap("Close", hfm&)
Endproc
ENDPROC
|
|
|
| |
|
|
|
| look: [...] Activates a window. The window must be attached to the calling thread's message billiardcue.
these not the case.
Try SetForegroundWindow : [...] and look on The Remarks. |
|
|
| |
|
|
|
Julian Schmidt | functions unfortunately immernoch not How pseudo.
declare prozess_id&
Windowstyle 24
Windowtitle "Hauptfenster"
Window 400,400,200,100
cls RGB(0,255,0)
print "Enter circa into Process To wechseln"
StartProzess()
User Messages 16
var hfm& = Filemap("Open", "Comm")
var pcomm& = Filemap("Map", hfm&)
whilenot ((%umessage=16) or iskey(27))
waitinput 30
case iskey(13) : External("User32","SetForegroundWindow",long(pcomm&,(4*0)))'SetActiveWindow(long(daten&,4*0))'Enter betätigt
endwhile
Process("Kill", prozess_id&, 0)
Filemap("Close", hfm&)
end
Proc StartProzess
prozess_id&=pExec("|Prozess")
Proc Process
var hfm& = Filemap("Open", "Comm")
var pcomm& = Filemap("Map", hfm&)
Windowstyle 24
Window 100,100-300,200
cls RGB(255,0,255)
long pcomm&, (4*0) = %hwnd
whilenot (%key=2)
waitinput
Endwhile
Filemap("Close", hfm&)
Endproc
ENDPROC
should "There is no foreground process.From [...] (see Remarks) hot that, I first because Standart-Process Hide must, before I the new Process whom Fokus zuteilen can? |
|
|
| |
|
|
|
Julian Schmidt | it functions too with SetActiveWindow! I had a Errors in the code, this have it now removes and now runs it....
declare prozess_id&
Windowstyle 24
Windowtitle "Hauptfenster"
Window 400,400,200,100
cls RGB(0,255,0)
print "Enter circa into Process To wechseln"
StartProzess()
User Messages 16
var hfm& = create("Filemap", "Comm", 36)
var comm& = Filemap("Map", hfm&)
whilenot ((%umessage=16) or iskey(27))
waitinput 30
case iskey(13) : SetactiveWindow(long(comm&,0))'Enter betätigt
endwhile
Process("Kill", prozess_id&, 0)
Filemap("Close", hfm&)
end
Proc StartProzess
prozess_id&=pExec("|Prozess")
Proc Process
Windowstyle 24
Window 100,100-300,200
cls RGB(255,0,255)
var hfm& = Filemap("Open", "Comm")
var pcomm& = Filemap("Map", hfm&)
long pcomm&,0=%hwnd
whilenot (%key=2)
waitinput 30
Endwhile
Filemap("Close", hfm&)
Endproc
ENDPROC
|
|
|
| |
|
|