C# in VS2015 // How to use mutiple functions/methods ?

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

C# in VS2015 // How to use mutiple functions/methods ?

by Csharp on Wed Feb 01, 2017 10:43 am

Hey, i've played around abit with C# and the AppClass and i'm able to make some working scripts. For reading purposes i would like to split up my program into different functions or methods.


An example of what i wish to accomplish: If i do this now, it stops running after excecuting playLoginMacro();

Code: Select all
using System;

namespace iMacrosThreading
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            playLoginMacro();
            playTrainingMacro();
        }
        public static void playLoginMacro()
        {
            ...
        }
        public static void playTrainingMacro()
        {
            ...
        }
    }
}


Thankyou
Csharp
 
Posts: 1
Joined: Wed Feb 01, 2017 10:32 am

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest

-->