Jump to content

Recommended Posts

Posted

Been stuck in this for a day now. As far as i know, the desktop's a syslistview32 control, where icons on the desktop is items, right?

Therefore i should be able to get the icon text using LVM_GETITEMTEXT?

using this code:

for item in GetListViewItems(hList)
     debugout(consolewrite, GetItemText(hList, item))
next

where GetItemText is:

  Reveal hidden contents

And hList is a class SysListView32 belonging to the progman window.

Output is:

0x01000000 + item + 000000000000000000000000000000 3C007D06FF (pointer to buffer at end) ... (zero'es)
[chars = 0]
The operation completed successfully.
[empty string]

Does anybody know what's going on? I'll admit i dont have a lot of knowledge about listviews, but this is the way that both msdn and general searching suggests (check out this link: http://social.msdn.microsoft.com/Forums/eu/winforms/thread/d7df8a4d-fc0f-4b62-80c9-7768756456e6)

Using autoit beta x64 (irrelevant though, tried in other languages too), and windows 7 x64.

Any help appreciated .. :D

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Posted

  On 6/30/2012 at 11:57 PM, 'abberration said:

I think you are making it more complicated than it needs to be. Why not just do something like this:

#include <file.au3>
#include <array.au3>

$list = _FileListToArray(@DesktopDir, "*.lnk", 1)
_ArrayDisplay($list)

I need to be able to get/set the icons positions, get the icon etc.. :)

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Posted

It sounds like you're looking to do something similar to what you might want to take a look at how he did it and adapt to your needs.

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!

  Reveal hidden contents

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

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