Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



IPhone EveryAir Controls

Discussion on IPhone EveryAir Controls within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Paraly's Avatar
 
elite*gold: 27
Join Date: Sep 2009
Posts: 5,609
Received Thanks: 1,596
IPhone EveryAir Controls

Huhu ich wollte für die App EveryAir für Iphone zusätzliche Controls machen
um Z.B. Dolphin oder anderes auf dem IPhone zu spielen. Ich dachte mir das könnte ich doch schnell in Autoit coden allerdings funktioniert es nicht so ganz.
Wenn ich mit der Maus auf eines der Controls klicke wird nichts an Notepad gesendet.Hoffe ihr wisst wo der Fehler ist oder villeicht ist ja einer so nett und codet mir das in gdi+ dann währen die Buttons sicher schöner bzw Transparent.

hier der code, bilder etc ist im download dabei.

Code:
HotKeySet("{esc}","_exit")


#RequireAdmin


#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Array.au3>



Global $aButton[7]


$gui = GUICreate("Test Windows regions", @DesktopWidth, @DesktopHeight,0,0, $WS_POPUP, $WS_EX_TOPMOST)
$aButton[0] = GUICtrlCreatePic("Images\start.bmp",594, 709 , 50,50)
$aButton[1] = GUICtrlCreatePic("Images\start.bmp",742, 707 , 50,50)
$aButton[2] = GUICtrlCreatePic("Images\A.bmp",1083, 626 , 100,100)
$aButton[3] = GUICtrlCreatePic("Images\B.bmp",982, 538 , 100,100)
$aButton[4] = GUICtrlCreatePic("Images\X.bmp",1187, 540, 100,100)
$aButton[5] = GUICtrlCreatePic("Images\Y.bmp",1079, 446 , 100,100)


;WinSetTrans("Test Windows regions","",100)

GUISetState(@SW_SHOW)

$pos = WinGetPos($gui)
_GuiHole($gui, 0, 0, @DesktopWidth, @DesktopHeight)


While 1
    $msg = GUIGetMsg()
    Switch $msg
		case $aButton[0]
ControlSend("Unbenannt - Editor","","","{0}")
			
		case $aButton[1]
ControlSend("Unbenannt - Editor","","","1")

		case $aButton[2]	
ControlSend("Unbenannt - Editor","","","2")
			

		case $aButton[3]
ControlSend("Unbenannt - Editor","","","3")

			send("{3}")		
		case $aButton[4]
ControlSend("Unbenannt - Editor","","","4")
		case $aButton[5]
ControlSend("Unbenannt - Editor","","","5")


			

    EndSwitch
WEnd







Func _GuiHole($h_win, $i_x, $i_y, $i_sizew, $i_sizeh)
    Local $outer_rgn, $inner_rgn, $combined_rgn
    $combined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)
    _WinAPI_DeleteObject($outer_rgn)
    _WinAPI_DeleteObject($inner_rgn)
    _AddCtrlRegion($combined_rgn, $aButton)
    _WinAPI_SetWindowRgn($h_win, $combined_rgn)
EndFunc   ;==>_GuiHole

Func _AddCtrlRegion($full_rgn, $ctrl_id)
    Local $ctrl_pos, $ctrl_rgn
    If IsArray($ctrl_id) Then
        For $i = 0 To UBound($ctrl_id) -1
            $ctrl_pos = ControlGetPos($gui, "", $ctrl_id[$i])
            $ctrl_rgn = _WinAPI_CreateRectRgn($ctrl_pos[0], $ctrl_pos[1], $ctrl_pos[0] + $ctrl_pos[2], $ctrl_pos[1] + $ctrl_pos[3])
            _WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)
            _WinAPI_DeleteObject($ctrl_rgn)
        Next
    Else
        $ctrl_pos = ControlGetPos($gui, "", $ctrl_id)
        $ctrl_rgn = _WinAPI_CreateRectRgn($ctrl_pos[0], $ctrl_pos[1], $ctrl_pos[0] + $ctrl_pos[2], $ctrl_pos[1] + $ctrl_pos[3])
        _WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)
        _WinAPI_DeleteObject($ctrl_rgn)
    EndIf
EndFunc   ;==>_AddCtrlRegion

func _exit()
Exit
EndFunc
Die Buttons sind an meine Auflösung angepasst 1366x768




Hier noch ein Video zur App EveryAir vom IPhone.


MFG Zocker5656
Paraly is offline  
Old 01/24/2012, 15:07   #2
 
Paraly's Avatar
 
elite*gold: 27
Join Date: Sep 2009
Posts: 5,609
Received Thanks: 1,596
hm hab ich den thread zu unübersichtlich erklärt oder weis wirklich keiner wie man buttons auf den desktop malt und bei linksklick darauf ein event passiert
Paraly is offline  
Old 01/26/2012, 18:28   #3
 
Der-Eddy's Avatar
 
elite*gold: 400
Join Date: Nov 2008
Posts: 67,905
Received Thanks: 19,505
Hab ich vor kurzem mal gefunden sollte dein Problem lösen:
da das über GDI+ läuft kannst du auch gleich transparente Bilder nehmen die dann schöner aussehen
Der-Eddy is offline  
Thanks
1 User
Old 01/28/2012, 21:18   #4
 
Paraly's Avatar
 
elite*gold: 27
Join Date: Sep 2009
Posts: 5,609
Received Thanks: 1,596
hm ich bekomms einfach nicht hin kann mir keiner ein programm das wie die Bildschirmtastatur von windows funktioniert nur halt mit einzelnen buttons programmieren?
Paraly is offline  
Old 01/31/2012, 17:56   #5
 
elite*gold: 179
Join Date: May 2010
Posts: 355
Received Thanks: 42
I dont understand is that going on IPod 3 ?
Everything™ is offline  
Reply


Similar Threads Similar Threads
Controls
07/31/2011 - AutoIt - 5 Replies
Else
Set your controls like a pro
02/01/2009 - CO2 Guides & Templates - 10 Replies
Heres a quick way to set controls or "hotkeys" in an efficient and durable way. Im gona explain how i set my controls but feel free to make changes for your confort. I set my hotkeys with the CTRL key because you always have to press it anyways. Ctrl+W inventory -you always want to look in your bag Ctrl+D clear -so much talkshit in co Ctrl+S sit -power over 9000 Ctrl+A shift screen -this may seem stupid to some but...



All times are GMT +1. The time now is 04:28.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.