Jump to content

newcomer44

Members
  • Posts

    6
  • Joined

  • Last visited

newcomer44's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Now I understand. All I had to do, was to reduce the Sleep(250) value to Sleep(10). Thanks at all.
  2. Hello, thanks for your proposals. This is nearly what I mean: Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") Send("This is a testline before the enter key was pressed." & @LF) Send("This is a testline before the enter key was pressed." & @LF) ; -------------------------------------------------------------------- #include<Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(250) If _IsPressed("0D", $dll) Then ; enter ExitLoop Else MsgBox(0, "confirmation", "Press <ENTER> to confirm") EndIf WEnd DllClose($dll) ; -------------------------------------------------------------------- Sleep(500) Send(@LF) Send(@LF) Send("This is a testline after the enter key was pressed." & @LF) Send("This is a testline after the enter key was pressed." & @LF) Exit The problem is, that I have to press the enter key too long, in order to continue the script flawlessly.
  3. Hello, as the title says, I want to break a script without pressing a key and resume it per hotkey. Many thanks in advance.
  4. Hello, if I run the script part from Post#1 it switches the monitor "Off". But if I move the mouse, the monitor switches "On". I want, that the monitor remains in "Off"- status and switches "On" if I push a key or a mouse button. If I run the script part from Post#15 and push "Alt"+"F7" the monitor switches "Off" for a second, then switches "On". It should show the same behavior as I wrote before. I don't know, how to realize this in a script. I want this for my notebook (laptop), which has no switch to turn off the display. Can anybody help me please? Perhaps the author? Thanks
  5. Hello PsaltyDS, the problem is solved! All I had to do was, to add this line : WinActivate($avWinListCurrent[$n][1], "") to the code. After that it looks like this: ; New window found If Not $fFound Then WinActivate($avWinListCurrent[$n][1], "") WinMove("[REGEXPTITLE:.+[ \- ]GIMP]", "GNU Image Manipulation Program", 169, 0, 893, 771 ) EndIf And so it does exactly what I want. As I see just now, You recommend in principle the same. I also tried to use this: WinMove($avWinListCurrent[$n][1], "", 169, 0, 893, 771), but it would also move a current window belonging to another program, if I would open such a window. Thank You very much for Your help! http://www.autoitscript.com/forum/style_im...icons/icon1.gif
  6. Hello, I took this (Post#8 in the thread): Cumulative Window lists (no duplicates) and "modified" it to: #include <Array.au3> ; Initialize tracking arrays Global $avWinListPrevious[1][2] = [[0, ""]], $avWinListCurrent ; Monitor unique window handles While 1 $avWinListCurrent = WinList("[REGEXPTITLE:.+[ \- ]GIMP]", "GNU Image Manipulation Program") For $n = $avWinListCurrent[0][0] To 1 Step -1 ; Check has title and visible If ($avWinListCurrent[$n][0] <> "") And BitAND(WinGetState($avWinListCurrent[$n][1]), 2) Then ; Check for already seen $fFound = False For $i = 1 To $avWinListPrevious[0][0] If $avWinListCurrent[$n][1] = $avWinListPrevious[$i][1] Then $fFound = True ExitLoop EndIf Next ; New window found If Not $fFound Then WinMove("[REGEXPTITLE:.+[ \- ]GIMP]", "GNU Image Manipulation Program", 169, 0, 893, 771 ) EndIf Else _ArrayDelete($avWinListCurrent, $n) EndIf Next $avWinListCurrent[0][0] = UBound($avWinListCurrent) - 1 $avWinListPrevious = $avWinListCurrent Sleep(500) WEnd I don't want to write to any file (what the author wanted), but single (once) move every new opened window or file from the "GIMP"-program with the "WinMove"-function, so that it will be shown up on the screen at the function-setted position, as soon as the window or file is opened. Probably it would be better to use the "handle" of the new window in the "WinMove"-function instead of "TITLE" and "TEXT". But I don't know how to do this. The problem is that, if I open a GIMP-file from the program, it will be minimized to the taskbar. That's not wanted. If I click on the belonging taskbar-button, the window shows up, but the "WinMove"-function from the script doesn't work any more. I'm using GIMP with Windows XP. I'm sorry about my bad English Thanks in advance for Your help.
×
×
  • Create New...