Jump to content

ControlListView 'ViewChange' fails


Recommended Posts

I am unable to change the view to "details" in explorer.

Can someone verify in WinXP Pro SP2

Sample Script:

Opt('WinTitleMatchMode',2)
Run('explorer "' & @TempDir & '"')
WinWait('Temp','FolderView')
WinActivate('Temp','FolderView')
ControlListView('Temp','FolderView','SysListView321','ViewChange','details')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','list')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','smallicons')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','largeicons')

The workaround I am currently using is Controlsend but sure would be nice to fix this issue if it is verified.

Edit: Changed sample script

Edited by bshoenhair
Link to comment
Share on other sites

for me it work perfect under XP/Sp2

Just a remark if you need help post in the "V3 Support forum" not in the "v3 bug report"

<{POST_SNAPBACK}>

Very strange, tested on 2 different computers and it fails. You did first manually change the explorer view to a different view other than "Details" before you tested the script right ?
Link to comment
Share on other sites

The following should cylcle through all the views but it doesn't.

What am I doing wrong ?

Opt('WinTitleMatchMode',2)
Run('explorer "' & @TempDir & '"')
WinWait('Temp','FolderView')
WinActivate('Temp','FolderView')
ControlListView('Temp','FolderView','SysListView321','ViewChange','details')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','list')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','smallicons')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','largeicons')
Link to comment
Share on other sites

The following should cylcle through all the views but it doesn't.

What am I doing wrong ?

Opt('WinTitleMatchMode',2)
Run('explorer "' & @TempDir & '"')
WinWait('Temp','FolderView')
WinActivate('Temp','FolderView')
ControlListView('Temp','FolderView','SysListView321','ViewChange','details')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','list')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','smallicons')
Sleep(1500)
ControlListView('Temp','FolderView','SysListView321','ViewChange','largeicons')

<{POST_SNAPBACK}>

working on my systtem XP/SP2 exceot I don't have the possibility to have the 'largeicons' in the explorer->view :(
Link to comment
Share on other sites

Not sure what the issue is, I have now tested on 3 computers now and it still won't work.

bedazzled has reported this issue Here also

Not to dought or offend jpm in any way but I still am curious if anyone else will experience this issue with my last example ?

I am hoping a few more users will test this on their computers and post there result, please test with the last example that cycles through the views.

Thank You

Edited by bshoenhair
Link to comment
Share on other sites

Anyone have any clue why I am having this issue ?

Like I said, I have tested on 3 computers and they all fail, also tested in VMWare workstation where it also failed.

There must be a system setting somewhere preventing this but don't know where.

Link to comment
Share on other sites

@jpm

OK, I figured out the issue for at least WinXP Pro SP2.

In the Explorer Folder Options - General - Tasks, if you have the "Show common tasks in folders" option selected instead of "Use Windows classic folders" the function will fail.

This should be noted in the help file for reference.

Edited by bshoenhair
Link to comment
Share on other sites

@jpm

OK, I figured out the issue for at least WinXP Pro SP2.

In the Explorer Folder Options - General - Tasks, if you have the "Show common tasks in folders" option selected instead of "Use Windows classic folders" the function will fail.

This should be noted in the help file for reference.

<{POST_SNAPBACK}>

jpm ?

Anyone ?

Link to comment
Share on other sites

jpm ?

Anyone ?

<{POST_SNAPBACK}>

I am not sure what you ask to document. We cannot document all Windows options in AutoIt. The scripter has the responsability to choose the way to interact with Windows. It is not always easy...
Link to comment
Share on other sites

I am not sure what you ask to document. We cannot document all Windows options in AutoIt. The scripter has the responsability to choose the way to interact with Windows. It is not always easy...

<{POST_SNAPBACK}>

This issue has been confirmed in Win98, WinME, Win2000Pro, and WinXP PRO - Home

I am only trying to point out a confirmed explorer settings issue that will cause ControlListView 'ViewChange' to fail. If you feel no documentation, or at least a heads up need to be added to the help file then thats up to you.

Link to comment
Share on other sites

  • 2 years later...

I've had a play with this script and come up with the following solution...

Opt('WinTitleMatchMode',2)

Run('explorer "' & @TempDir & '"')

WinWait('Temp','FolderView')

WinActivate('Temp','FolderView')

Global $Key=0, $Hwnd = WinGetHandle(WinGetTitle("Temp"))

Global $RegKey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"

If RegRead($RegKey, "WebView") = 1 Then $Key=1

if $Key=1 then UpdateExplorer(0) ; only needed to show screen with msgbox

ControlListView('Temp','FolderView','SysListView321','ViewChange','list')

if $Key=1 then UpdateExplorer(1) ; only needed to show screen with msgbox

MsgBox(0, "","list",3)

if $Key=1 then UpdateExplorer(0) ; only needed to show screen with msgbox

ControlListView('Temp','FolderView','SysListView321','ViewChange','largeicons')

if $Key=1 then UpdateExplorer(1) ; only needed to show screen with msgbox

MsgBox(0, "","largeicons",3)

if $Key=1 then UpdateExplorer(0) ; only needed to show screen with msgbox

ControlListView('Temp','FolderView','SysListView321','ViewChange','details')

if $Key=1 then UpdateExplorer(1) ; only needed to show screen with msgbox

MsgBox(0, "","details",3)

WinClose($hWnd)

Func UpdateExplorer($On=0)

RegWrite($RegKey, "WebView", "REG_DWORD", $On)

DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0)

EndFunc

This way, it works irrespective of if "Use Windows Classic folders" is selected or not.

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...