Jump to content

saturnknts

Members
  • Posts

    16
  • Joined

  • Last visited

saturnknts's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. not experienced enough to give you a solution for that, maybe one of the IE guru's have the answer sorry. btw i did notice something, if the user resizes your gui to maximum then the labels overlap the obj. so in order to fix it you need to set the GUICtrlSetResizing(-1, $GUI_DOCKSIZE) for each label and you will see they don't over lap anymore. or you can copy paste the below over your coding. used a func so be sure and copy paste it to the bottom of your coding as well to set both resize and font. good luck. lastly, where are you going to post this up, i'd like to download the final product just for grins. tim $China = GUICtrlCreateLabel("China", 0, 24, 123, 24) GUICtrlSetColor(-1, 0xFF0000) _size() $WesternChina = GUICtrlCreateLabel("Western China", 0, 96, 123, 24) GUICtrlSetColor(-1, 0x808000) _size() $OasisKingdom = GUICtrlCreateLabel("Oasis Kingdom", 0, 168, 123, 24) GUICtrlSetColor(-1, 0x0000FF) _size() $TaklaMakan = GUICtrlCreateLabel("Takla Makan", 0, 240, 123, 24) GUICtrlSetColor(-1, 0x008000) _size() oÝ÷ Ù«­¢+Ø)Õ¹}Í¥é ¤(%U% ÑɱMѽ¹Ð ´Ä°ÄȰàÀÀ°Ð°ÅÕ½Ðí5LM¹ÌMÉ¥ÅÕ½Ðì¤(%U% ÑɱMÑIͥ饹 ´Ä°ÀÌØíU%}= -M%i¤)¹Õ¹(
  2. since i didnt have the image files i was using my own sorry and they were jpg and gif. not sure why you were using bmp image files, convert them to jpg and then change your file install lines to direct it to the exact location per my example below and try again. let me know. not sure what you mean by the program won't exit, do you mean when you press the x in the upper right corner if won't? works fine on my end using the latest beta. tim *edit* upon further review, it appears file associations have alot to do with this. even changing bmp files to open in internet explorer does not work. if you change like i recommend then all should be well in the world FileInstall("C:\AutoIt3\supertemp\data\world.jpg", $worldmap) FileInstall("C:\AutoIt3\supertemp\data\jangan.jpg", $Janganmap) FileInstall("C:\AutoIt3\supertemp\data\china.jpg", $Chinamap)
  3. try this and let me know if it works for you. not sure why i decided to write the whole code for ya, but since i used to play the game and wrote a pricing program for it with autoit i guess there was an attachment to it any further questions feel free to holler. #include <GUIConstants.au3> #include <File.au3> #include <IE.au3> $worldmap = _TempFile() $Janganmap = _TempFile() $Chinamap = _TempFile() $Donwhangmap = _TempFile() $WesternChinamap = _TempFile() $Hotanmap = _TempFile() $OasisKingdommap = _TempFile() $TaklaMankanmap = _TempFile() FileInstall("data\world.bmp", $worldmap) FileInstall("data\jangan.bmp", $Janganmap) FileInstall("data\china.bmp", $Chinamap) FileInstall("data\donwhang.bmp", $Donwhangmap) FileInstall("data\westernchina.bmp", $WesternChinamap) FileInstall("data\hotan.bmp", $Hotanmap) FileInstall("data\oasiskingdom.bmp", $OasisKingdommap) FileInstall("data\taklamakan.bmp", $TaklaMankanmap) _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $gui = GUICreate("Silkroad Map", 651, 451, _ 190,113, $WS_POPUP + $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS,$WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oIE, 128, 24, 520, 360) GUICtrlSetResizing($GUIActiveX, $GUI_DOCKBORDERS) $China = GUICtrlCreateLabel("China", 0, 24, 123, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) $WesternChina = GUICtrlCreateLabel("Western China", 0, 96, 123, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x808000) $OasisKingdom = GUICtrlCreateLabel("Oasis Kingdom", 0, 168, 123, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $TaklaMakan = GUICtrlCreateLabel("Takla Makan", 0, 240, 123, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x008000) $JanganButton = GUICtrlCreateButton("Jangan", 0, 48, 121, 17, 0) $ChinaButton = GUICtrlCreateButton("China", 0, 72, 121, 17, 0) $DonwhangButton = GUICtrlCreateButton("Donwhang", 0, 120, 121, 17, 0) $WesternChinaButton = GUICtrlCreateButton("Western China", 0, 144, 121, 17, 0) $HotanButton = GUICtrlCreateButton("Hotan", 0, 192, 121, 17, 0) $OasisKingdomButton = GUICtrlCreateButton("Oasis Kingdom ", 0, 216, 121, 17, 0) $TaklaMankanButton = GUICtrlCreateButton("Takla Mankan", 0, 264, 121, 17, 0) GUISetState(@SW_SHOW) _IENavigate ($oIE, $worldmap) ;navigate to the first image While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE _cleanup() ;delete the temp files before closing Exit Case $nMsg = $JanganButton _IENavigate ($oIE, $Janganmap) Case $nMsg = $ChinaButton _IENavigate ($oIE, $Chinamap) Case $nMsg = $DonwhangButton _IENavigate ($oIE, $Donwhangmap) Case $nMsg = $WesternChinaButton _IENavigate ($oIE, $WesternChinamap) Case $nMsg = $HotanButton _IENavigate ($oIE, $Hotanmap) Case $nMsg = $OasisKingdomButton _IENavigate ($oIE, $OasisKingdommap) Case $nMsg = $TaklaMankanButton _IENavigate ($oIE, $TaklaMankanmap) EndSelect WEnd Func _cleanup() FileDelete($worldmap) FileDelete($Janganmap) FileDelete($Chinamap) FileDelete($Donwhangmap) FileDelete($WesternChinamap) FileDelete($Hotanmap) FileDelete($OasisKingdommap) FileDelete($TaklaMankanmap) EndFunc
  4. and i understood what you meant. http://www.autoitscript.com/forum/index.php?showtopic=20255 and stand behind my answer
  5. i don't believe you can change it with msgbox's. and if you are talking about the icons from the help file: decimal flag Icon-related Result hexadecimal flag 0 (No icon) 0x0 16 Stop-sign icon 0x10 32 Question-mark icon 0x20 48 Exclamation-point icon 0x30 64 Information-sign icon consisting of an 'i' in a circle 0x40 those are built in and not changeable to my knowledge. you may have to create a child gui in order to have the icon the same.
  6. try changing your bitor statement to $pic=GUICreate("", 68, 71, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) <------yours $pic=GUICreate("", 68, 71, 10, 10,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD),$gui) <------change to this and see if it helps. not sure if it will. i have been playing with tranparencies for the last week and think i have gotten a little bit of a grasp on them. btw, is the main gui moveable? you might try and move it around as well and see what affect that has on everything. if your child gets lost try playing with winsettrans, just stay away from 255 for the child gui tim i'd test it for you but your pic link is broken
  7. seeing as no one has chimed in yet i think from all my exploring over the last few days that it's not possible for icons, but i could be wrong too. just havent seen anything on making them transparent. now if you are able to convert them to gif then there would be a solution for you let me know if you need help with that. btw $WS_CLIPSIBLINGS is an option for the $guicreate, not for a $guicreatepic. tim
  8. not trying to bump, just wanted to add some new code that should be reproducible since i cleaned it up a but and replaced my images with system images from xp. needs gafrosts GUIScrollBars.au3 thanks again in advance to anyone who might give me some light on this subject. tim houser #include <GUIConstants.au3> #include <GUIScrollBars.au3> Global $m_width = -871 , $m_height = 799 $tempchild = 0 $tempchildpic = 0 $world = @Systemdir & "\oobe\images\monitor.gif" $spark1 = @Systemdir & "\oobe\images\wpakey.jpg" $minelvls = @Systemdir & "\oobe\images\mslogo.jpg" GUIRegisterMsg($WM_CREATE, "MY_WM_CREATE") GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") GUIRegisterMsg($WM_VSCROLL, "MY_WM_VSCROLL") GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL") $gui = GUICreate("VCO Navigator", 250, 400, 555, 115, BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX),$WS_EX_TOPMOST) GUISetBkColor(0xFF0000) $temppic = GUICtrlCreatePic($world, 0, 0, 0, 0, BitOR($SS_NOTIFY,$WS_GROUP)) GuiCtrlSetState(-1,$GUI_DISABLE) GUISetState(@SW_SHOW) $sparkliesmenu = GUICtrlCreateMenu("opaque") $sparklieitem1 = GUICtrlCreateMenuitem ("opaque",$sparkliesmenu) $sparkliesmenu2 = GUICtrlCreateMenu("transparent") $sparklieitem2 = GUICtrlCreateMenuitem ("transparent",$sparkliesmenu2) While 1 $Msg = GUIGetMsg() $sethorz = -1*($iHorzPos*7) $setvert = -1*($iVertPos*16) Select Case $Msg = $sparklieitem1 _del() $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0) GuiCtrlSetState(-1,$GUI_DISABLE) $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_MDICHILD,$gui) $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0) GuiCtrlSetState(-1,$GUI_DISABLE) GUISetState(@SW_SHOW) Case $Msg = $sparklieitem2 _del() $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0) GuiCtrlSetState(-1,$GUI_DISABLE) $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui) $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0) GuiCtrlSetState(-1,$GUI_DISABLE) GUISetState(@SW_SHOW) EndSelect Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _del() GUICtrlDelete($temppic) If $tempchild <> 0 Then GUIDelete($tempchild) EndFunc
  9. ok, i'm going insane. and i just know its going to be something stupid. but i might as well suck it up and ask a question. per my first image you can see that the child is drawn fine. stays stationary like i want it to when the scroll bars are moved and everything. even resizing the main gui window does not affect it. second image is now the problem, when you grab the main gui and move it the child blurs for lack of a better term. i guess you could say it doesnt redraw with everything else. of course if you minimize the window redrws just fine until you move the main window again. third image is making the child tranparent and its properties work like i want them(stationary despite window move or scrollbar move), but the image is messed up(semi transparent) then for some reason instead of being opaque i just am having a mental block as to how to make it work right, i have read and searched (forums and help) and tested everything under the sun for the last 2 days and still no luck. please help. thanks very much in advance to whoever might lend a hand, tim p.s. i know my code is a mess right now( will clean it once i get this figured out), but just wanted to show some of the stuff i had been trying. #include <GUIConstants.au3> #include <GUIScrollBars.au3> #include <file.au3> Global $m_width = -871 , $m_height = 799 $tempchild = 0 $tempchildpic = 0 $world = _TempFile() $banner = _TempFile() $spark1 = _TempFile() $spark2 = _TempFile() $minelvls = _TempFile() FileInstall("C:\voyage\voyage program\world.jpg", $world) FileInstall("C:\voyage\voyage program\banner1.gif", $banner) FileInstall("C:\voyage\voyage program\sparklies1.jpg", $spark1) FileInstall("C:\voyage\voyage program\sparklies2.jpg", $spark2) FileInstall("C:\voyage\voyage program\minelvls.jpg", $minelvls) GUIRegisterMsg($WM_CREATE, "MY_WM_CREATE") GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") GUIRegisterMsg($WM_VSCROLL, "MY_WM_VSCROLL") GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL") ;~ - ;$trans = GUICreate("", 512, 256, 555, 115,$WS_POPUP,$WS_EX_LAYERED) ; GUICtrlCreatePic($banner, 0, 0, 512, 256) ; GUISetState(@SW_SHOW) ;sleep(2000) ;GUIDelete($trans) ;~ - $gui = GUICreate("VCO Navigator", 250, 400, 555, 115, BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX),$WS_EX_TOPMOST) GUISetBkColor(0xFF0000) $temppic = GUICtrlCreatePic($world, 0, 0, 0, 0, BitOR($SS_NOTIFY,$WS_GROUP)) GuiCtrlSetState(-1,$GUI_DISABLE) GUISetState(@SW_SHOW) ;$tempchild0 = GUICreate("",231,24,1,20,$WS_POPUP, $WS_EX_MDICHILD,$gui) ;GUISetBkColor(0xFF0000) ;$Label1 = GUICtrlCreateLabel("Mining levels", 1, 20, 231, 24) ;GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") ;GUICtrlSetBkColor(-1, 0x008080) ;GUISetState(@SW_SHOW, $tempchild0) ;GuiCtrlSetState(-1,$GUI_DISABLE) $sparkliesmenu = GUICtrlCreateMenu("Sparklies") $sparklieitem1 = GUICtrlCreateMenuitem ("Show Level 1 Sparkles",$sparkliesmenu) ;$tempsparklieitem = GUICtrlCreateMenuitem ("testing",$sparklieitem1) $sparklieitem2 = GUICtrlCreateMenuitem ("Show Level 2 Sparkles",$sparkliesmenu) $sparklieitem3 = GUICtrlCreateMenuitem ("Show Level 3 Sparkles",$sparkliesmenu) $sparklieitem4 = GUICtrlCreateMenuitem ("Show Level 4 Sparkles",$sparkliesmenu) $tradegoodsmenu = GUICtrlCreateMenu("Trade Goods") $displaymenu = GUICtrlCreateMenu("Various Displays") While 1 $Msg = GUIGetMsg() $sethorz = -1*($iHorzPos*7) $setvert = -1*($iVertPos*16) Select case $Msg = $sparklieitem1 _del() $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0) GuiCtrlSetState(-1,$GUI_DISABLE) $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui) $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0) ;GUISetState(@SW_SHOW) GuiCtrlSetState(-1,$GUI_DISABLE) GUISetState(@SW_SHOW) ;GUISwitch($GUI) case $msg = $sparklieitem2 _del() $temppic = GUICtrlCreatePic($spark2, $sethorz, $setvert, 0, 0) $tempchild = GUICreate("",229,72,1,20,$WS_POPUP, $WS_EX_MDICHILD,$gui) $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0) GUISetState(@SW_SHOW, $tempchild) case $msg = $sparklieitem3 ; transparent pic ;$trans = GUICreate("", 512, 256, 0, 0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui) ;GUICtrlCreatePic($banner, 0, 0, 512, 256) ;GUISetState(@SW_SHOW) ;sleep(2000) ;GUIDelete($trans) EndSelect Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _del() GUICtrlDelete($temppic) If $tempchild <> 0 Then GUIDelete($tempchild) ;GUISetState(@SW_SHOW,$gui) EndFunc
  10. my mind was to full of things and this was the easiest was i could decide to do it and make sense in my mind. but now that my program is complete i might go back and test it once again so as to reduce a little bit of code. tim
  11. this is what i did and it works (was quite surprised myself!) Case $msg = $About GUICtrlDelete($about) _ChildGui() $About = GUICtrlCreateButton("About", 320, 370, 180, 35) just deleted the button and upon return to parent recreated it.
  12. i know it's clunky but here is what i came up with. it's effective and thats all i care about lol. Case $msg = $calcprice $sell = Round(($npc*2+$npcint+$npcintstr+$npcplus+$npccrit+$npcblock+$npcsos)*$pressurex) $error = GUICtrlRead($inputnpcprice) $sell2 = String($sell) Select case $error = Asc($s_char) >= 48 And Asc($s_char) <= 57 MsgBox (0, "Enter the Buy or Cost Price First!", "You must Enter the Buy or Cost Price First!") Case $sell2 <= 999 $sell3 = $sell case $sell2 <= 9999 $hund = StringRight($sell2,3) $thous = Stringleft($sell2,1) $sell3 = ($thous & "," & $hund) case $sell2 <= 99999 $hund = StringRight($sell2,3) $thous = Stringleft($sell2,2) $sell3 = ($thous & "," & $hund) case $sell2 <= 999999 $hund = StringRight($sell2,3) $thous = Stringleft($sell2,3) $sell3 = ($thous & "," & $hund) case $sell2 <= 9999999 $hund = StringRight($sell2,3) $thous = Stringmid($sell2,2,3) $mill = Stringleft($sell2,1) $sell3 = ($mill& "," & $thous & "," & $hund) case $sell2 <= 99999999 $hund = StringRight($sell2,3) $thous = Stringmid($sell2,3,3) $mill = Stringleft($sell2,2) $sell3 = ($mill& "," & $thous & "," & $hund) case $sell2 <= 999999999 $hund = StringRight($sell2,3) $thous = Stringmid($sell2,4,3) $mill = Stringleft($sell2,3) $sell3 = ($mill& "," & $thous & "," & $hund) case $sell2 >1000000000 Msgbox(0, "ummmmmmm", "Are You Crazy? That's way too much;)") EndSelect
  13. fair enough, i am sorry i took it wrong then. just tired and stressed over all this learning! tim
  14. that's what i was hoping to get as a response. as you can see by my post i was searching "thousand" and for some never thought to search "1000". thank you Valuater and thatsgreat2345 i'm am sorry it was too much to ask, but thanks for making it feel homey around here!
  15. FINE, delete my post. IF YOU THINK I AM THAT STUPID. I have been learning the new gui on my own going through almost every post, doing searches on my own and i was looking for an easy answer. i guess i should just spend another week looking around. and if you think i am a novice or afraid of hard work and determination, go look at the autoit version 1 reference examples to find my windows 95 script. look under tim houser i am sure it's something simple and i am overlooking it. i'd sure like to know how i deserve your response? if you're not going to help, why even post?
×
×
  • Create New...