Jump to content
Chimaera

AutoIt Snippets

Recommended Posts

3 hours ago, jchd said:

Also be aware that the Map datatype is deprecated.

What!? :blink:

When? Why? Was there any official annoucement?


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites
Posted (edited)
8 minutes ago, TheDcoder said:

What!? :blink:

When? Why? Was there any official annoucement?

 

Quote from a statement made by Jon in a private forum:

Quote

Well IIRC Map is fundamentally broken due to the way variables work in AutoIt.

So he won't be including it as it is, but it did stay in Beta for the moment. Don't hold your breath though to get this fixed and included. ;)

Jos 

Edited by Jos

Share this post


Link to post
Share on other sites
3 hours ago, BrewManNH said:

Use a scripting.dictionary instead for future proofing

I agree

@Inpho You may wrap scripting.dictionary like BrewManNH has suggested, you can use these functions as inspiration:

  1. _Map_DictObjectToMap
  2. _Map_MapToDictObject

A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

@Jos Such a shame... oh well, AutoIt is already good enough with the current data types :)

Definitely adding this to the ToDo list of my implementation of AutoIt for sure though.


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

Everything that can be done in Maps can be done in Scripting.Dictionary with the right wrappers.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


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

Everything that can be done in Maps can be done in Scripting.Dictionary with the right wrappers.

Agreed... still, having native support in the language would be a great feature to have :)


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

For kicks :

#include <WinAPISysWin.au3>

_UntrapGhostSysTrayIcons()

Func _UntrapGhostSysTrayIcons()
    Local $aMPos = MouseGetPos(), $x = 1
    Local $h = ControlGetHandle(_WinAPI_FindWindow('Shell_TrayWnd', ''), "", "[Class:SysPager]")
    Local $apos = WinGetPos($h)
    MouseMove($apos[0] + $apos[2], $apos[1] + 10, 0)
    Local $iRange = $apos[2] / 10
    Do
        MouseMove($apos[0] + $apos[2] - $iRange, $apos[1] + 10, 11 - $x)
        $apos = WinGetPos($h)
        $x += 1
        $iRange = ($apos[2] / 10) * $x
    Until $x > 10
    MouseMove($apos[0] + $apos[2], $apos[1] + 10)
    MouseMove($aMPos[0], $aMPos[1], 0)
EndFunc

 

Edited by Deye

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

×
×
  • Create New...