Sign in to follow this  
Followers 0
eHrgo

[GuiCtrlCreateInput] - Failure ... Why?

8 posts in this topic

#1 ·  Posted (edited)

Hi,

I have a "settings" window which appear when I click on a button.

After a few seconds in my main Loop, when I click on the settings button Every Input Created in this UI doesn't appear anymore.

I tested, every GuiCtrlCreateInput returns me : 0

Return Value

Success: Returns the identifier (controlID) of the new control. 
Failure: Returns 0.

Do you have any Idea where it can come from? Nothing about those error in Help. :whistle:

Thanks

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites



Would you mind showing us a sample that reproduces this problem of yours ?

Share this post


Link to post
Share on other sites

Hi,

I have a "settings" window which appear when I click on a button.

After a few seconds in my main Loop, when I click on the settings button Every Input Created in this UI doesn't appear anymore.

I tested, every GuiCtrlCreateInput returns me : 0

Return Value

Success: Returns the identifier (controlID) of the new control. 
Failure: Returns 0.

Do you have any Idea where it can come from? Nothing about those error in Help. :whistle:

Thanks

At the risk of sounding rude... have you actually read this post and it make sense to you? If you were going to try and help someone with this, how would you go about it?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry, English isn't my native language .. and this problem is weird. If i knew where it come from, I would have already solve it.

My script is 500 lines long and I don't know at all where the problem come from...

Im going to search a bit more, this post is useless.

Edit: i just wanted to know if someone has an idea: Where does a GuiCtrlCreateInput Failure can come from? So that I'm able to search without loosing my time.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hum...

I think I found out:

My program is simple:

Every ten seconds, a function is called, this function take few seconds to be completed, during this time my buttons are inactive [No issue].

If I click on the "Settings" button during this time. My Settings Panel appear [guiCreate] when the function is finished..

The problem is: it appears without GuiCtrlCreateInput .. bug? [same after: if I close it and clic again ...stuck without inputs.]

I don't think there is any issue to that bug. Im gonna try to reduce this function freezing time.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

Hum...

I think I found out:

My program is simple:

Every ten seconds, a function is called, this function take few seconds to be completed, during this time my buttons are inactive [No issue].

If I click on the "Settings" button during this time. My Settings Panel appear [guiCreate] when the function is finished..

The problem is: it appears without GuiCtrlCreateInput .. bug? [same after: if I close it and clic again ...stuck without inputs.]

I don't think there is any issue to that bug. Im gonna try to reduce this function freezing time.

I'm going to make an assumption because you still haven't even made an effort to even post a small replicator script for us to see what you are talking about.

ASSumption - Your input control is under another control, maybe a pic or button or another input or a label whatever... or you didn't disable one of the previous controls that needed to be before drawing the one that doesn't show.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I'm very sorry, I though it was understandable...

Ok, little fake script, but maybe that can help you:

Func Function()
;..Whatever [Downloading and analyzing a webpage [StrinRegExp, IniWrite, etc...]
;..Take 2 seconds to complete
Endfunc

$MainUi=GuiCreate ('...',....)
$Settings=GuiCtrlCreateButton( ....)
$Close=GuiCtrlCreateButton(....)

While 1
$timer=TimerInit ()
 GuiSetState (..)
if TimerDiff($timer) > 10 then Call ('Function')
  
Select
Case GuiGetMsg()=$Close 
      Exit 0
Case GuiGetMsg()=$Settings
     $SettingsUI=GuiCreate ('..2'.....)
     GuiCtrlCreateInput (...)
     $Close2=GuiCtrlCreateButton(....2)
           While GuiGetMsg()<>$Close2
               GuiSetState(..)
           Wend
      GuiDelete ($settingsUi)
Endselect
Wend

Ok, Here we are, now:

If I clic on the $Settings button while Function is being called.. [During those 2sec] The $SettingsUI will appear [After those 2 sec] but without The GuiCtrlCreateInput [but with everything else in it].

After that, if I Close the settings windows[$Close2], and open it again 5 seconds after the function call [$Settngs] no GuiCtrlCreateInput anymore ... stuck.

Thanks a lot for you help. And Sorry. :whistle:

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

I guess you missed the point of creating a "replicated" script (Meaning, something that actually works and demonstrates your issue), I'm sorry, but personally, I'm not filling in the "..." to figure out your problem that you specifically have.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0