Jump to content
joaker

When autoit works Force Stop the code c#

Recommended Posts

Guys hello ! Im beginner in here . 
When I press Start button my autoit is start but soo long and I can't stop it doesn't stop before it ends ( also when code finish auto stop) 
But now I try to find how can I stop while continuing? 
Also I use Global hotkey and I try to send new form, or app exit or Shutdown ( code ) .
Please Help me about that.
Thanks !

Share this post


Link to post
Share on other sites

joaker,

Welcome to the AutoIt forums.

I suggest reading the Interrupting a running function tutorial in the Wiki - that shoudl get you thinking along the right lines.

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
3 minutes ago, Melba23 said:

joaker,

AutoIt forumlarına hoş geldiniz.

 Wiki'de çalışan fonksiyonun kesintiye uğratılmasına dair öğreticiyi okumanızı öneririm  - bu sizi doğru satırlarda düşünmenizi sağlar.

M23

This is not for c# . Im beginner to both code and english. And I dont use console app I use winapp. 
I can't understand so complex codes :( 

Share this post


Link to post
Share on other sites
1 minute ago, joaker said:

This is not for c# .

No ofcourse not, it is for AutoIt3, for which this support forum is used for! ;)
We are not a C# forum.

Jos


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.
  :)

Share this post


Link to post
Share on other sites
9 minutes ago, Jos said:

Post your code so we can have a look!

Jos

if (comboBox1.Text == "1920x1080")
                    {
                        DialogResult dialog = MessageBox.Show("Yazı İşlemi başlayacak Onayla", "Text Test", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                        // Autoit Codes


                        if (dialog == DialogResult.Yes)
                        {
                            for (int i = 0; i < numberOfIterations; i++)
                            {
                                btn_Yazdir.Enabled = false;
                                btn_Yazdir1.Enabled = false;
                                
                                //Autoit codes

                                btn_Yazdir.Enabled = true;
                                btn_Yazdir1.Enabled = true;
                            }

                            MessageBox.Show("Yazma İşlemi Tamamlandı", "Text Test", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                        else if (dialog == DialogResult.No) ;
                        {
                            btn_Yazdir.Enabled = true;
                            btn_Yazdir1.Enabled = true;
                            return;
                        }
                    }

 

Share this post


Link to post
Share on other sites

I try Like this but I think wrong code for me

protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x0312 && m.WParam.ToInt32() == MYACTION_HOTKEY_ID)
            {
                AutoIt.AutoItX.Shutdown(5);
                MessageBox.Show("Program Durduruldu.");
            }
            base.WndProc(ref m);
        }

also  dont work :D 

Share this post


Link to post
Share on other sites
Posted (edited)

As stated, this is not a c# forum, so for interrupting a C# program you will have to see help somewhere else.
Questions about Autoit3 can be asked here, and in this case the "AutoItX Help and Support" section where this is now moved to.
So are the AutoIt3 calls working as expected?

Jos

Edited by Jos

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.
  :)

Share this post


Link to post
Share on other sites
2 minutes ago, Jos said:

Belirtildiği gibi, bu ac # forum değildir, bu nedenle bir C3 programını kesmek için başka bir yerde yardım görmeniz gerekecektir.
Autoit3 ile ilgili soruları burada ve bu durumda artık taşındığı "AutoItX Yardım ve Destek" bölümünde bulabilirsiniz.

Jos

Yes you say to "this is not a c# forum", But How can I fix it ? Also my post seen in AutoItX

Share this post


Link to post
Share on other sites
1 minute ago, joaker said:

But How can I fix it 

Try to reread and understand the posts I made as this is answered already! ;) 


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.
  :)

Share this post


Link to post
Share on other sites

No need to PM me. You posted code is C# using AutoItX functions, but this forum is not for answering C# question, just the AutoitX  related question.
Ok?

Jos 


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.
  :)

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...