-
Posts
72 -
Joined
-
Last visited
OldCoder's Achievements

Wayfarer (2/7)
0
Reputation
-
Exactly. I had thought of that as well, though they say an older version could be used on the 8xxx series, I have yet to find it. Even if I did find it, this would be less then ideal since it is a software solution, which nVidia even admits is too slow for graphic intensive programs, like games. At this point I will probably go with the yoke flipping, but if anyone has another solution, I am all ears. Thanks again.
-
For reversing video...I've never seen it before. Most modern video cards allow for rotation for such purposes as tablets so you could rotate 90° so the text can be displayed like a book, not in wide screen. On the other hand, if you know of any video cards with such abilities, I am more then eager to hear about them. A new video card would be an expense I wouldn't mind. Thanks.
-
I had thought of that, but the space available is limited. As "Blue_Drache" had figured out, I am creating an old style, stand up video arcade game for my kids. I am painting the inside black and placing a large mirror inside to reflect the video output. The fastest solution would be best, since the games may require most of the CPU/GPUs processing cycles. The video card I am using is in my old P4 computer; a GForce 8400GS. It's not the greatest card in the west, but for the old P4, it's rockin'. I didn't want to buy a bunch of new equipment just for this project, which is more an experiment then a project. I've looked into yoke flipping, (going inside my old CRT and reversing the horizontal feeds to the yoke), and may go this way, but I was hoping for something as simple as a new or modded video driver. Thanks everyone for your responses, and BTW "BrewManNH", I just want to reverse the screen horizontally, (make text and everything appear backward), not rotate the screen. This I can do...wish the other was that easy. Any more ideas are most welcome and thanks to you all again.
-
Hi, I was wondering if anyone knew of a way to horizontally flip, (not rotate), the screen in XP/Win7? Linux has a way, it seems, but I don't use it much. I am trying to mirror the monitor output so I can use a mirror to reflect the video screen. I've looked into rear projection and NVidia Keystone and have had no success so far, (Keystone doesn't work on my video card and can't find any rear projection software that does the job). I was thinking of 3 different ways to approach this: Software based. This I was hoping AutoIt might handle, though it may be the slowest way to do it.Hardware based. I thought of rewiring the VGA connector to maybe get a reverse horizontal scan, but no info on this so far.Driver based. Either finding a driver online, (no luck there), or making my own. Can you make drivers with AutoIt?Hope someone can help me with this. I am in the middle of a project and this is the one thing holding it up. Thanks.
-
Ahhhhhhhhh! Very nice! The word wrap thing would be a nice feature for them to add too, but I'm happy with this. Thanks, man.
-
Is there a way to make the scripts you post keep their original formating, like the tabs? Also, is there a word wrap feature I am missing, (can't seem to find one)? Thanks.
-
I had created a hook to get the values of the mouse wheel and button a while back, but have recently wanted more from this small function. I wanted to be able to disable or reroute mouse events by simply placing values into variables, without the need for calling functions. The following is the result. #cs MOUSE HOOK This function hooks, (captures), all mouse events and can programmatically disable or redirect them to other functions. Call MWHL_INIT() to initialize. The following variables either offer information or control the flow of mouse events: $MWHL = Wheel turned up or down, (1=up, -1=down, 0=idle) $MBUT = Middle Button, (1=click, 0=not) $BM, (Block Mouse), variables disable or control flow. By making them 1, they will disable an event, (ie. $BMMM=1 disables all Mouse Movement). By placing a function name in them, you can redirect the event to a function, (ie. $BMRD="CapRite" captures the right mouse button and sends it to the CapRite() function): $BMMM = Mouse Move $BMLD = Left Down $BMLU = Left Up $BMRD = Right Down $BMRD = Right Up $BMMD = Middle Down $BMMU = Middle Up $BMMS = Middle Scroll Be sure to set $BM variables to zero to re-enable normal functioning. Finally, to disable the hook, call MWHL(-1,-1,-1). #ce Func MWHL_INIT() Global $MWHL,$BMMS=0,$BMLD=0,$BMLU=0, $BMRD=0, $BMRU=0, $BMMD=0,$BMMU=0,$BMMM=0,$MBUT,$mwhl_call=DllCall("kernel32.dll","hwnd","GetModuleHandle","ptr",0),$mwhl_back=DllCall("user32.dll","hwnd","SetWindowsHookEx","int",14,"ptr",DllCallbackGetPtr(DllCallbackRegister("MWHL","int","hwnd;uint;long")),"hwnd",$mwhl_call[0],"dword",0),$MVAR[12]=["","$BMMM","$BMLD","$BMLU","","$BMRD","$BMRU","","$BMMD","$BMMU","","$BMMS"] EndFunc Func MWHL($h,$m,$l) If $h=-1 AND $m=-1 AND $l=-1 Then Return DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $mwhl_back[0]) Global $MWHL=BitShift(DllStructGetData(DllStructCreate("int X;int Y;dword mouseData",$l),3),16)/120, $MBUT=($m=0x208),$MEVENT=BitAND($m, 0xFFFF) If $MEVENT<512 OR $MEVENT>522 Then Return Local $MV=Execute($MVAR[$MEVENT-511]) If IsString($MV) Then Call($MV) Return 1 EndIf Return $MV EndFunc I have tested this a fair amount and then searched the forum for anything just like this, and yes, I know there are other mouse hooks out there, but one of them doesn't seem to get the direction of the mouse wheel, and I just like the simplicity of this one. It's format may seem a bit tight, but I love things that have a lot of power and occupy a little space. Hope someone finds it useful. Cheers, EDIT: BTW, yes, I know I didn't change the names of the calls from my old, original post, but I felt a bit nostalgic about the original functions and decided to leave their names as they are. If you like, change them to whatever you want. *Formatting care of "BrewManNH" Limited. For all your code formatting needs, call BrewManNH's.
-
For those of us who don't install AutoIt, I would change this code from "Example_Sharing_Memory_Var.au3": If FileExists(@ScriptDir & "" & "Sharing_Memory_Client.exe") = 1 Then $return = Run("Sharing_Memory_Client.exe " & @AutoItPID & " " & $Pointer1 & " " & $Pointer2 & " " & $Pointer3, @ScriptDir) Else If FileExists(@ScriptDir & "" & "Sharing_Memory_Client.au3") = 1 Then $AutoItexePath = RegRead("HKEY_LOCAL_MACHINESOFTWAREAutoIt v3AutoIt", "InstallDir");betaInstallDir for beta $ToRun = '"' & $AutoItexePath & 'AutoIt3.exe "' & ' "' & @ScriptDir & 'Sharing_Memory_Client.au3"' & ' "' & @AutoItPID &'" "' & $Pointer1 & '" "' & $Pointer2 & '" "' & $Pointer3 & '"' Run($ToRun) Else MsgBox(48, "Error" , "'Sharing_Memory_Client.au3' not found" & @CR & "Both applications should be in the same folder.") Exit EndIf EndIf To this code: If FileExists(@ScriptDir & "" & "Sharing_Memory_Client.exe") = 1 Then $return = Run("Sharing_Memory_Client.exe " & @AutoItPID & " " & $Pointer1 & " " & $Pointer2 & " " & $Pointer3, @ScriptDir) Else If FileExists(@ScriptDir & "" & "Sharing_Memory_Client.au3") = 1 Then $ToRun = @AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & 'Sharing_Memory_Client.au3"' & ' "' & @AutoItPID &'" "' & $Pointer1 & '" "' & $Pointer2 & '" "' & $Pointer3 & '"' Run($ToRun) Else MsgBox(48, "Error" , "'Sharing_Memory_Client.au3' not found" & @CR & "Both applications should be in the same folder.") Exit EndIf EndIf The difference is removing: $AutoItexePath = RegRead("HKEY_LOCAL_MACHINESOFTWAREAutoIt v3AutoIt", "InstallDir");betaInstallDir for beta $ToRun = '"' & $AutoItexePath & 'AutoIt3.exe "' & ' "' & @ScriptDir & 'Sharing_Memory_Client.au3"' & ' "' & @AutoItPID &'" "' & $Pointer1 & '" "' & $Pointer2 & '" "' & $Pointer3 & '"' And adding: $ToRun = @AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & 'Sharing_Memory_Client.au3"' & ' "' & @AutoItPID &'" "' & $Pointer1 & '" "' & $Pointer2 & '" "' & $Pointer3 & '"' Cheers!
-
Yeah, my bad. I had forgotten to make allotments for no GUI present. Here's an updated code that should work in most, if not all, situations. <snip> Hope that helps. Cheers.
-
I suppose if it was recording keys and not just testing for their switching it might be. Is there some kind of paranoia in these parts about keyloggers? A part of programing, in any language, is the ability to give a user the option to input information into one's program. Without this very fundamental acquisition of data, a very large hole is left in one's programing repertoire. Besides, what's the basic difference between what I have made and _IsPressed()? Thanks for the advice. I, thus far, have had no problems with this function. It seems to perform well at relatively low CPU consumption. Of course I've mostly been using it to detect if any key has been pressed on the keyboard or mouse, not to record keys and steal people's passwords. So, it may not be fully tested, and I concede the point. Thanks.
-
I've been looking for a way to do this for some time now that wasn't too hard on the system, and while _IsPressed() worked OK, I was worried about the drag it could have on some users' CPUs. I haven't done extensive testing of this, but it seems to work pretty good. Hope this is helpful. AnyKey() <snip> Cheers.
-
Just something I've needed on various occasions. Cheers. 'IsVisible()' #cs IsVisible(WinHandle [, Offset [,Control]]) Check if the middle and all four corners of a window or control are currently visible. $wiv_hWnd = The handle to the window to check, (if blank, the active window will be used). $wiv_offx = [optional] How far inside the window/control you want to check. 5 is a good value for windows since some corners of windows are rounded, especially in the titlebar. More may be needed. $wiv_ctrl = [optional] The control you want to check. Blank if entire window. Returns: = 1 if window/control is visible =-1 if the window does not exist =-2 if the window is hidden =-3 if the window is minimized = 0 or Window Handle/Control Text of the window/control covering the defined window/control #ce Func IsVisible($wiv_hWnd="", $wiv_off=5, $wiv_ctrl="") If NOT IsHWnd($wiv_hWnd) Then $wiv_hWnd=WinGetHandle(WinActive("")) Local $wiv_state=WinGetState($wiv_hWnd) If NOT BitAND($wiv_state, 1) Then Return -1 If NOT BitAND($wiv_state, 2) Then Return -2 If BitAND($wiv_state, 16) Then Return -3 If $wiv_ctrl="" Then Local $wiv_pos=WinGetPos($wiv_hWnd) Else Local $wiv_pos=ControlGetGlobalPos($wiv_hWnd, $wiv_ctrl) EndIf Local $left=$wiv_pos[0]+$wiv_off, $rite=($wiv_pos[0]+$wiv_off)+($wiv_pos[2]-($wiv_off*2)), $top=$wiv_pos[1]+$wiv_off, $botm=($wiv_pos[1]+$wiv_off)+($wiv_pos[3]-($wiv_off*2)), $cenx=$left+Int($wiv_pos[2]/2), $ceny=$top+Int($wiv_pos[3]/2), $lt, $lb, $rt, $rb, $xy $xy=WinFromPoint($cenx, $ceny) If $xy<>$wiv_hWnd AND ChildGetParent($xy)<>$wiv_hWnd Then Return $xy $lt=WinFromPoint($left, $top) If $lt<>$wiv_hWnd AND ChildGetParent($lt)<>$wiv_hWnd Then Return $lt $rb=WinFromPoint($rite, $botm) If $rb<>$wiv_hWnd AND ChildGetParent($rb)<>$wiv_hWnd Then Return $rb $rt=WinFromPoint($rite, $top) If $rt<>$wiv_hWnd AND ChildGetParent($rt)<>$wiv_hWnd Then Return $rt $lb=WinFromPoint($left,$botm) If $lb<>$wiv_hWnd AND ChildGetParent($lb)<>$wiv_hWnd Then Return $lb Return 1 EndFunc Func WinFromPoint($wfp_x, $wfp_y) Local $wfp_pt=DllStructCreate("int X;int Y"),$wfp_1=DllStructSetData($wfp_pt,"x",$wfp_x),$wfp_2=DllStructSetData($wfp_pt,"y",$wfp_y),$wfp_ptr=DllStructCreate("int64",DllStructGetPtr($wfp_pt)),$wfp_ret=DllCall("user32.dll","hwnd","WindowFromPoint","int64",DllStructGetData($wfp_ptr,1)) Return $wfp_ret[0] EndFunc Func ChildGetParent($child_hWnd) Local $child_h=$child_hWnd, $child_ret If NOT IsHWnd($child_hWnd) Then $child_h=GUICtrlGetHandle($child_hWnd) If NOT IsHWnd($child_h) Then $child_h=WinGetHandle($child_hWnd) $child_ret=DllCall("user32.dll", "hwnd", "GetParent", "hwnd", $child_hWnd) Return $child_ret[0] EndFunc Func ControlGetGlobalPos($cts_hWnd, $cts_ctrl) If NOT IsHWnd($cts_hWnd) Then $cts_hWnd=WinGetHandle($cts_hWnd) If NOT IsHWnd($cts_ctrl) Then $cts_ctrl=GuiCtrlGetHandle($cts_ctrl) Local $cts_tmp=ControlGetPos($cts_hWnd,"",$cts_ctrl), $cts_tp=DllStructCreate("int X;int Y"), $cts_ret, $cts_1=DllStructSetData($cts_tp, 1, $cts_tmp[0]), $cts_2=DllStructSetData($cts_tp, 2, $cts_tmp[1]), $cts_3=DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $cts_hWnd, "ptr", DllStructGetPtr($cts_tp)) Return StringSplit(DllStructGetData($cts_tp, 1)&"|"&DllStructGetData($cts_tp, 2)&"|"&$cts_tmp[2]&"|"&$cts_tmp[3], "|", 2) EndFunc
-
Very interesting. I am not sure what I am looking at yet. Is it an actual way to create real GUIs with customizable controls, titlebars, etc., or is it a work-around, like removing the titlebar from the GUI and using an image for the titlebar, buttons, etc.? I must say, it's quite lovely. Kudos. Either way, thanks for your reply. Cheers.
-
No one has any ideas? I was sure someone from this forum could figure this out. I know I can't.
-
I am confused. Do you want to run a GUI from DOS or do you want to make a DOS GUI that runs in Windows? EDIT: If it's the latter, then maybe this might get you started: $GUI_Form1=GUICreate("Command Prompt Sim", @DesktopWidth*.8, @DesktopHeight*.8) $GUI_Edit1=GUICtrlCreateEdit(@CRLF, 0, 0, @DesktopWidth*.8, @DesktopHeight*.8, 2102468) ;BitOR($ES_AUTOVSCROLL,$ES_OEMCONVERT,$ES_AUTOHSCROLL,$ES_WANTRETURN,$ES_MULTILINE,$WS_VSCROLL)) GUICtrlSetFont(-1, 14, 800, 0, "Courier New") GUICtrlSetBkColor(-1, 0xEFEDC9) GUICtrlSetColor(-1, 0x0000A6) GUISetState() $dos=Run(@ComSpec & " /k ", "", @SW_HIDE, 7) $send="" $def_dir="" While 1 $nMsg=GUIGetMsg() $dosgetout=StdoutRead($dos) $doserrgetout=StderrRead($dos) If $nMsg=-3 Then ExitLoop $tmp=GUICtrlRead($GUI_Edit1) If $dosgetout OR $doserrgetout Then If $dosgetout AND $dosgetout<>$send Then GUICtrlSetData($GUI_Edit1, $tmp & $dosgetout) Else If $doserrgetout<>$Send Then GUICtrlSetData($GUI_Edit1, $tmp & $doserrgetout) EndIf DllCall("user32.dll", "int", "SendMessage", "hwnd", GUICtrlGetHandle($GUI_Edit1), "int", 182, "wparam", 0, "lparam", 1000000) EndIf If GetEnter() Then $send=StringMid($tmp, StringInStr($tmp, @CRLF, 0, -2)) $send=StringMid($send, StringInStr($send, ">")+1) If StringLen($send)>2 Then StdInWrite($dos, $send) EndIf WEnd ProcessClose($dos) Func GetEnter() If IsDeclared("key_timer") AND TimerDiff($key_timer)<50 Then Return Global $key_timer = TimerInit() $g_temp = DllCall("user32.dll", "long", "GetAsyncKeyState", "long", 13) If BitAND($g_temp[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc Cheers