Jump to content

strange behavior with gui


t0ddie
 Share

Recommended Posts

actually i just have commented out the "win" commands in my code and the problem ceases

so i just have to figure out a better place to add them.

EDIT: this problem occurred because i called guisetstate() BEFORE the win commands

this works fine now

SplashTextOn("Assistant","Ready to Go!",@DesktopWidth - 227,100,221,0)
WinActivate("Diablo II")
winmove("Diablo II","",221,104,806,636 )
GUISetState()
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()

thanks for everyones input!

it was as simple as moving GUISetState()

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

actually i just have commented out the "win" commands in my code and the problem ceases

so i just have to figure out a better place to add them.

Any time the GUI looses focus the problem will occur, so also MsgBox() functions trigger this problem.

I don't know of any good work around yet for this problem...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Any time the GUI looses focus the problem will occur, so also MsgBox() functions trigger this problem.

I don't know of any good work around yet for this problem...

ooh, that sux. hope it isnt a problem for me in the future,

im good for now though heh.

EDIT: well its a problem now heh.. ill have to look at larry's workaround

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

is there a way to set the focus of the gui so that its always on top?

also i would need to make it so that the window ("Diablo II") wont minimize

if possible,... it may be a fix?

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

i can see you havent given up on making comments though

and as for my problem, i doubt you ever really started trying.

i posted 2 solutions that work with beta, after giving what i thought were 'good enough' hints so you could do it yourself. Seems like i tried harder to solve your problem than you did.

i said i would be back to waste more time arguing.. and because of your comments thats exactly what is happening.

congratulations, i guess you can say you were right about something; although since my comment was inspired by the prediction it's kind of a self fulfilling prophecy, but hey, you should definitely give yourself credit EVERY time you're right.

im not stupid,

trying to start another argument? :P

its just that with assholes like you i can predict the future.

all i do all day is try to help people on here. i doubt you could find 2 other people on this forum that would agree that i'm an asshole.

thanks.

ill find my own workaround by changing the code little by little until it looks like the gui from the first code and behaves like the gui from the second code. thats all i wanted but i guess im going to have to troubleshoot this myself. guess nobody could answer why because they arent using the same version as i am.

so you asked for help, direct help that solved your problem was suggested by several people, including devs, but rather than take any of the advice you were given by people who know the subject better than yourself, you're going to vomit some more of your own code in SciTE and hope it works, and post another thread about the new code, wasting more time?

sorry about dragging this thread out i guess... oh and

no offense cameronsdad.

i don't take offense to anything, but were you talking about when you called me an asshole, or when you wasted so much of my day? Either way, 'no offense' isn't an apology.

***edit*** fixed typo

Edited by cameronsdad
Link to comment
Share on other sites

no offense that i called you an asshole.

but i wasnt apologizing.

you chose to spend time reading because you want to reply. just like i feel the need to reply.

i stated what version i was using several times... im glad those worked with beta. they didnt hint at the solution that i came up with. and yes... your probably a very helpful person

but when i comment that "im not stupid" and you reply with

"trying to start another argument?"

i feel my original flaming was pertinent. the rude comments you made make me feel vindicated.

now as i said before, focus on ths topic changed from my code to discussion of a comment you left.

go ahead and further post more bullshit

see my previous post for current discussion of THE TOPIC

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

no offense that i called you an asshole.

but i wasnt apologizing.

you chose to spend time reading because you want to reply. just like i feel the need to reply.

i stated what version i was using several times... im glad those worked with beta. they didnt hint at the solution that i came up with. and yes... your probably a very helpful person

but when i comment that "im not stupid" and you reply with

"trying to start another argument?"

i feel my original flaming was pertinent. the rude comments you made make me feel vindicated.

now as i said before, focus on ths topic changed from my code to discussion of a comment you left.

go ahead and further post more bullshit

see my previous post for current discussion of THE TOPIC

yes, as i stated earlier, i'd already given up on offering any more help (fyi, the code i posted worked for me in production release too), and was only replying to the posts where you called me an asshole, and then directed your 'no offense' to me. Now that i've explained that post (that was the only reason for this post), and you've said that you're going to make your own solution despite the working ones you were given, i don't think there's any reason for more posts to this thread.
Link to comment
Share on other sites

well i did make a solution

i changed the placement of guisetstate()

but when i said i would make my own solution that was posted when i was unaware that the problem would be re-occuring.

the problem takes place whenever another window or box gains focus.

i understand your need to reply. no further rebuttal is needed unless you change your mind about helping.

possibly if the gui is always "on top" window this might fix this issue.

im going to try a few things like putting a button before the radio's as well and playing around with focus

comments anyone?

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

well i did make a solution

i changed the placement of guisetstate()

but when i said i would make my own solution that was posted when i was unaware that the problem would be re-occuring.

the problem takes place whenever another window or box gains focus.

i understand your need to reply. no further rebuttal is needed unless you change your mind about helping.

possibly if the gui is always "on top" window this might fix this issue.

im going to try a few things like putting a button before the radio's as well and playing around with focus

comments anyone?

you could always just use one of the solutions already supplied to you. this is jdeb's code, and it DOES work with 3.1.1. He posted it 2 pages back, and it does what you want.

#include <GuiConstants.au3>
$msg = 0
GUICreate("Controls", 217,@DesktopHeight,0,0)

GUICtrlCreateGroup("Runes / Amounts", 2, 0, 213, 235)
$r1 = GUICtrlCreateRadio("Amn  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Amn", "NotFound"), 4, 13, 68)
$r2 = GUICtrlCreateRadio("Ber  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ber", "NotFound"), 74, 13, 68)
$r3 = GUICtrlCreateRadio("Cham  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Cham", "NotFound"), 144, 13, 68)

$r4 = GUICtrlCreateRadio("Dol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Dol", "NotFound"), 4, 33, 70)
$r5 = GUICtrlCreateRadio("El  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "El", "NotFound"), 74, 33, 70)
$r6 = GUICtrlCreateRadio("Eld  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eld", "NotFound"), 144, 33, 70)

$r7 = GUICtrlCreateRadio("Eth  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Eth", "NotFound"), 4, 53, 70)
$r8 = GUICtrlCreateRadio("Fal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Fal", "NotFound"), 74, 53, 70)
$r9 = GUICtrlCreateRadio("Gul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Gul", "NotFound"), 144, 53, 70)

$r10 = GUICtrlCreateRadio("Hel  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Hel", "NotFound"), 4, 73, 70)
$r11 = GUICtrlCreateRadio("Io  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Io", "NotFound"), 74, 73, 70)
$r12 = GUICtrlCreateRadio("Ist  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ist", "NotFound"), 144, 73, 70)

$r13 = GUICtrlCreateRadio("Ith  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ith", "NotFound"), 4, 93, 70)
$r14 = GUICtrlCreateRadio("Jah  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Jah", "NotFound"), 74, 93, 70)
$r15 = GUICtrlCreateRadio("Ko  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ko", "NotFound"), 144, 93, 70)

$r16 = GUICtrlCreateRadio("Lem  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lem", "NotFound"), 4, 113, 70)
$r17 = GUICtrlCreateRadio("Lo  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lo", "NotFound"), 74, 113, 70)
$r18 = GUICtrlCreateRadio("Lum  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Lum", "NotFound"), 144,113, 70)

$r19 = GUICtrlCreateRadio("Mal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Mal", "NotFound"), 4, 133, 70)
$r20 = GUICtrlCreateRadio("Nef  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Nef", "NotFound"), 74, 133, 70)
$r21 = GUICtrlCreateRadio("Ohm  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ohm", "NotFound"), 144, 133, 70)

$r22 = GUICtrlCreateRadio("Ort  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ort", "NotFound"), 4, 153, 70)
$r23 = GUICtrlCreateRadio("Pul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Pul", "NotFound"), 74, 153, 70)
$r24 = GUICtrlCreateRadio("Ral  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Ral", "NotFound"), 144, 153, 70)

$r25 = GUICtrlCreateRadio("Shael  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Shael", "NotFound"), 4, 173, 70)
$r26 = GUICtrlCreateRadio("Sol  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sol", "NotFound"), 74, 173, 70)
$r27 = GUICtrlCreateRadio("Sur  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Sur", "NotFound"), 144, 173, 70)

$r28 = GUICtrlCreateRadio("Tal  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tal", "NotFound"), 4, 193, 70)
$r29 = GUICtrlCreateRadio("Tir  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Tir", "NotFound"), 74, 193, 70)
$r30 = GUICtrlCreateRadio("Thul  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Thul", "NotFound"), 144, 193, 70)

$r31 = GUICtrlCreateRadio("Um  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Um", "NotFound"), 4, 213, 70)
$r32 = GUICtrlCreateRadio("Vex  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Vex", "NotFound"),74, 213, 70)
$r33 = GUICtrlCreateRadio("Zod  " & IniRead(@ScriptDir & "/Settings.ini", "RuneAmounts", "Zod", "NotFound"), 144, 213, 53)
GUICtrlCreateGroup("", -99, -99, 1, 1);close group

GUISetState()

SplashTextOn("Assistant","Ready to Go!",@DesktopWidth - 227,100,221,0)
WinActivate("Diablo II")
winmove("Diablo II","",221,104,806,636 )
$msg = GUIGetMsg()
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
         Select
             
              Case $msg = $r1
         moverune()

         EndSelect
WEnd


Exit

Func moverune()
msgbox(0,"test","why the hell am i executing?")
endfunc
Link to comment
Share on other sites

with the problem with radio buttons being checked when another window gains focus, a workaround i use is just to place a different type of control in the code before the radios. like a button.

works fine now.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...