Jump to content
Sign in to follow this  
nekkutta

AutoIt nOOb here, valid question

Recommended Posts

nekkutta

Hello Everyone, I am new to AutoIt, but I've been programming for many years, mostly NoteTab Clips and batch files, anyway, I've come across a slight hangup in the script I'm working on.

Basically I'm trying to create a background image changer for the Application Pstart, the problem is the Control where the image is loaded, [CLASS:TVirtualStringTree; INSTANCE:3] I don't know what commands can be sent to it with ControlCommand() I'm hoping for a command that will Refresh the background image.

If anyone has any info on this, it would be greatly appreciated!!

TIA, nekkutta


[size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size]

Share this post


Link to post
Share on other sites
picea892

Hmm.

Try this

_WinAPI_RedrawWindow( ControlGetHandle("PStart","","[CLASS:TVirtualStringTree; INSTANCE:3]"))

at the very least, this is likely the function you are looking for. It needs the control handle to work, not the class.

The example in the help for getting control handle is below. You will need the title of the window first, I have only guessed at it based on your link.

$handle = ControlGetHandle("[CLASS:Notepad]", "", "Edit1")

Share this post


Link to post
Share on other sites
nekkutta

Well, I tried _WinAPI_RedrawWindow no go though, Thanks for that, I'm still in the habit of forgetting about the UDFs :) I'm almost tempted to email the dev of pstart and ask what event I can send to the application to get it to refresh the background image, either that or destroy the control and hope they added extensive error handling *doubtful* that would recreate the control, lol actually, that don't seem like that bad of an idea, although I'm probably going to have to get the new handle every time *sigh*


[size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size]

Share this post


Link to post
Share on other sites
nekkutta

well the destroy didn't work, after reading the help a little more after I threw it in, I see why, darn.... guess its time to email the devs...


[size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.