Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
01-03-2008, 06:38 PM
|
#16
|
|
FLAC
Join Date: Aug 2006
Location: Sun Diego
Vehicle: 2001 A4 1.8TQMS
Posts: 936
|
that's pretty sweet.
|
|
|
01-03-2008, 07:38 PM
|
#17
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
Rendered, live screencap.
Still working on the buttons for iG, I have another child window started for the button code (right of rr) so I can see the size of the buttons, just need to figure out how to make them non-visable and overlay my graphic menu.
Also I need to look more at LS's IGCONTROL because my butttons work great with iGuidance running standalone, but when RR embeds the window title, AUtoIT code seems to lose iGuidance app. I need to figure out another way for AUtoIT to be aware of that window. IGCONTROL it works with iG embedded so I need to figure out the code to do it.
Much respect for the AUtoIT programmers here, any tips?
|
|
|
01-03-2008, 07:46 PM
|
#18
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 787
|
include this in your script. (if you don't have it)
Code:
opt("winsearchchildren", 1)
|
|
|
01-03-2008, 07:53 PM
|
#19
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
yup have that. Here is my code, half of it is from the alpha blending tutorial and the other half is what I constructed from reading the tips and experimenting.
Code:
#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>
; ===============================================================================================================================
; Global constants
; ===============================================================================================================================
Global Const $AC_SRC_ALPHA = 1
Global Const $ULW_ALPHA = 2
; ===============================================================================================================================
; Global variables
; ===============================================================================================================================
Global $hGUI1, $hGUI2, $iLabel1, $iLabel2, $iSlider, $hImage
; Create layered child window
$hGUI2 = GUICreate("Menu", 350, 350, -350, 74, -1, $WS_EX_LAYERED, $hGUI1)
; Load layered image
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile("C:\DEVEL\skins\Carwings-s\float_menu.png")
SetBitMap($hGUI2, $hImage, 255)
GUISetState()
GUICreate("buttons",100,467,1,76)
$zoomin = GUICtrlCreateButton("zoomin",1,145,65,65)
GUICtrlSetState(-1,$GUI_FOCUS)
$zoomout = GUICtrlCreateButton("zoomout",1,210,65,65)
GUICtrlSetState(-1,$GUI_FOCUS)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Opt("WinSearchChildren", 1)
Case $msg = $zoomin
WinActivate ("iGuidance")
Send("{up}")
Case $msg = $zoomout
WinActivate ("iGuidance")
Send("{down}")
Case $msg = $GUI_EVENT_CLOSE
;While GuiGetMsg() <> $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
; Loop until user exits
do
until GUIGetMsg() =$GUI_EVENT_CLOSE
; Release resources
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
; ===============================================================================================================================
; SetBitMap
; ===============================================================================================================================
Func SetBitmap($hGUI, $hImage, $iOpacity)
Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
;$hScrDC = _WinAPI_GetDC(0)
$hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize )
DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage))
DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha" , $iOpacity )
DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
_WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
_WinAPI_ReleaseDC (0, $hScrDC)
_WinAPI_SelectObject($hMemDC, $hOld)
_WinAPI_DeleteObject($hBitmap)
_WinAPI_DeleteDC ($hMemDC)
EndFunc
|
|
|
01-03-2008, 08:25 PM
|
#20
|
|
Newbie
Join Date: Aug 2006
Posts: 29
|
looks amazing! please finish your carwings skin i love it already!
|
|
|
01-03-2008, 08:27 PM
|
#21
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 787
|
post the png so i can try it out. the opt line has to be in the first line, not in the inside the loop
|
|
|
01-03-2008, 09:06 PM
|
#22
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
Thanks ElCamino for the help, I am completely new to AUtoIT trying to learn as I go here.
Right click > save as
|
|
|
01-03-2008, 09:40 PM
|
#23
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 787
|
well i just added this 2 lines and it works using your script
Code:
Opt("WinSearchChildren", 1)
Opt("wintitlematchmode", 3)
|
|
|
01-03-2008, 10:18 PM
|
#24
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
Got it! Works great!
Now I just need to figure out how to make it always stay on top in the GPS menu, and transfer the buttons to the image
Last edited by blk02si; 01-03-2008 at 10:21 PM.
|
|
|
01-03-2008, 11:56 PM
|
#25
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 787
|
EDIT: i had some time to do some coding to your script, and i came up with this, is fully functional, all the buttons work inside the png, just the first button has the on state as i'm not sure if thats the best way to do it.
Last edited by EL CAMINO; 01-06-2008 at 02:53 PM.
|
|
|
01-05-2008, 01:23 AM
|
#26
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
Wow, nice coding ElCamino! Works great for me, I ended up doing some more coding last night also but the code you posted is much further along than mine was. Thanks man, you're good at this! Going to update the PNG with some labels now.
|
|
|
01-05-2008, 02:36 AM
|
#27
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
OK added some labels, for the menu buttons.
I also noticed that address and fav button code both launch the 'set destination' menu after the artwork update. I believe these buttons are supposed to go deeper into the IG menu. after looking at the code. "return home" works great though and its about 3 menus deep in IG. Anyway here is my actual, labeled, working GPS menu so far!
And below is my new float_menu if you want to try it out ElCamino.
I think I am also going to need some sort of exit code to have RR control when the menu turns on/off.
Also the button1 'on' state looks good to me. Need to finish the rest now.
Last edited by blk02si; 01-05-2008 at 02:38 AM.
|
|
|
01-05-2008, 09:40 AM
|
#28
|
|
Maximum Bitrate
Join Date: Jul 2005
Location: upland california us
Vehicle: 1981 chevy el camino
Posts: 787
|
cool, dont know what iG version you use i add those functions quickly just for testing each of the buttons, i have v4. you might have to increase the sleep time in those functions that get stock, adding the close and the possible more than one instance running, is easy, i'lll give a test later on today.
|
|
|
01-05-2008, 12:41 PM
|
#29
|
|
FLAC
Join Date: Jul 2005
Location: Motorcity
Vehicle: '06 Triple Black Mustang
Posts: 1,548
|
I had a feeling that you were using IG4
I can make a couple adjustments for IG3 though.
I have sunday and monday off work so I will have some time to code more, major thanks again for your assistance.
How long have you been using AUtoIT?
|
|
|
01-05-2008, 01:26 PM
|
#30
|
|
Raw Wave
Join Date: Aug 2004
Location: Chicago area,IL
Vehicle: 01 Ford ZX3
Posts: 2,160
|
I've using AI for some time, ~3yrs, so I could offer some help if needed too...
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:50 AM.
|
|