Autoit programming

Posted on 2012-08-15
Last Modified: 2012-09-04
How to show the details of IE web proxy (enable or disable ,ip of proxy server...etc) with a message box by using the Autoit programming?
Question by:Hitony
    LVL 29

    Accepted Solution

    Basically use RegRead and RegWrite, for MsgBox use flag of 4 for Yes and No for what ever question you want for enabling/disabling.  Wrote up a quick example below.

    ;~ Enter your Proxy Server Below
    $IE_ProxyServer = 'PROXY.SERVER.COM:8080'
      ;~ Write Proxy Server into registry
      RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings', 'ProxyServer', 'REG_SZ', $IE_ProxyServer)
    ;~ Check to see if proxy is enabled/disabled
    $IE_ProxyEnable = RegRead('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings', 'ProxyEnable')
    If $IE_ProxyEnable = 1 Then
      ;~ If proxy is enabled change message to disable proxy.
      $IE_ProxyString = 'Disable proxy "' & $IE_ProxyServer & '"?'
      ;~ If proxy is disabled change message to enable proxy.
      $IE_ProxyString = 'Enable proxy "' & $IE_ProxyServer & '"?'
    ;~ Message Box to enable/disable proxy.
    $IE_ProxyMsgBox = MsgBox(4, 'Enable/Disable Proxy', $IE_ProxyString)
    ;~ If user clicks yes than it will enable/disable the proxy.
    If $IE_ProxyMsgBox = 6 Then
      If $IE_ProxyEnable = 1 Then
        RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings', 'ProxyEnable', 'REG_DWORD', 0)
        RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings', 'ProxyEnable', 'REG_DWORD', 1)

    Open in new window

    LVL 29

    Expert Comment

    Why the B Grade?

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    This is about my first experience with programming Arduino.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now