Jump to content
Sign in to follow this  
beqa

please help me on moving files

Recommended Posts

beqa

hi all

please help me.

i want to move file to one folder

jaws screenreader is a program for reading information on screen.

i have several versions of jaws. i want to display all installed versions of jaws in a listview with checkboxes, check versions which i want and then when i will press on start button file must be moved in jaws folders which i checked.

sorry my english isn't very good

Share this post


Link to post
Share on other sites
Jos

So, where are you getting stuck with coding this script?

Show what you have and be explicit in what the problem is with it and what you are looking for.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
beqa

hi

this is my code

#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GuiListView.au3>
Opt('GUICloseOnESC', 1)
$hGUI = GUICreate("spmvs configurator", 300, 200)
$gJAWS = GUICtrlCreateListView("JAWS Versions", 10, 150, 140, 20)
_GUICtrlListView_SetExtendedListViewStyle($gJAWS, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
$hSave = GUICtrlCreateButton("start", 50, 20)
$hCancel = GUICtrlCreateButton("close", 50, 20)
$hAbout = GUICtrlCreateButton("about", 50, 20)
   GUISetState()
While 1
    Switch GUIGetMsg()
Case 3, $hCancel
ExitLoop
case $HSave
case $hAbout
MsgBox(64, "about", 'SpmvsConfigurator Author beqa') ; Will demonstrate Button 2 being pressed
EndSwitch
WEnd

i don't know how to get jaws versions from registry to arai and then display it in the listview

or if it isn't right please help me

Edited by Jos
added CODE tags

Share this post


Link to post
Share on other sites
water

Please post code in AutoIt tags [ autoit] and [ /autoit] (without the space).

To retrieve data from the registry use functions RegRead or search the forum for one of the many registry UDFs.

Using google I found the following: http://svn.haxx.se/tsvn/archive-2010-05/0005.shtml

Ok, here is the way to find out that JAWS is installed and what version is used:

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
beqa

ok, thanks very mutch, i know how to read information from the registry, i don't know how to display this subkeys in listview.

Ok, here is the way to find out that JAWS is installed and what version is

used:

The registry key:

HKEY_LOCAL_MACHINESOFTWAREFreedom ScientificJAWS

contains all versions of JAWS that are located on this machine, that is the

subkeys: 9.0, 10.0, 11.0 mean that the versions 9.0, 10.0, 11.0 are

installed side by side - it is a very often practice in JAWS installations -

a lot of people use a couple versions of JAWS at the same time for different

reasons.

please help me

Share this post


Link to post
Share on other sites
Jos

Moved from Examples to Support . so please read the forum purpose before creating a topic to ensure it is in the correct forum.

When you know how to read the registry I wonder why that logic isn't in the posted script yet?

What does the helpfile tell you about filling entries in the Control created by GUICtrlCreateListView?

There is a nice simple example there and explaining how it works.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
beqa

i can't display jaws versions in listview i don't understand how to do that

Share this post


Link to post
Share on other sites
beqa

please help me to display subkeys from registry in listview.

subkeys mean versions of jaws.

Share this post


Link to post
Share on other sites
beqa

hey guis please help me to display subkeys from registry in listview

Share this post


Link to post
Share on other sites
water

This short example should give you an idea:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Global $listview, $button, $item1, $item2, $item3, $input1, $msg
;Global $sKey = "HKEY_LOCAL_MACHINESOFTWAREFreedom ScientificJAWS"
Global $sKey = "HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice"
GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES)
$listview = GUICtrlCreateListView("col1", 10, 10, 200, 150)
_GetSubkey($skey)

GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

Func _GetSubkey($sKey)

    Local $iIndex = 1, $sSubKey
    While 1
        $sSubKey = RegEnumKey($skey, $iIndex)
        If @error <> 0 Then ExitLoop
        ConsoleWrite($sSubkey & @CRLF)
        GUICtrlCreateListViewItem($sSubKey, $listview)
        $iIndex += 1
    WEnd
    Return

EndFunc   ;==>_GetSubkey
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Mikeman27294

$Version =        RegRead('HKEY_LOCAL_MACHINESOFTWAREFreedom ScientificJAWS', 'Version');I dont know the name of the subkey so rename version to whatever it is.
$Gui =            GUICreate("ListView", 500, 500) ;Creates the GUI
$ListView =        GUICtrlCreateListView("Name|Value", 0, 0, 500, 500) ;Create a list view control
$LVItem =        GUICtrlCreateListViewItem("Version|"&$Version, $ListView) ;Create the required list view item - This is where the magic happens
GUISetState(@SW_SHOW, $Gui) ;Show the GUI
While 1 ;Infnite loop until the program is ended
    If GUIGetMsg() = -3 Then ;If the close button is clicked
        Exit ;Exit the program
    EndIf ;Declares the end of the if statement
WEnd ;Declares the end of the while loop

Since I don't have this JAWS program you talk about installed, I don't know whether the subkey in regread (version) is the correct name, so you will have to change that. I hope this works for you, but I dont quite understand EXACTLY what you need from it.

Share this post


Link to post
Share on other sites
beqa

thanks vater very mutch.

it works for me very well

Share this post


Link to post
Share on other sites
water
:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
beqa

ok i understand.

now another question.

how i can move files in folders which are selected?

e.g. i have jaws versions 12 and 13 installed i want to move files in this folders.

my code is bellow.

[ autoit]

#NoTrayIcon

#include <GUIConstantsEx.au3>

#include <ButtonConstants.au3>

#include <EditConstants.au3>

#include <GuiListView.au3>

Opt('GUICloseOnESC', 1)

$hGUI = GUICreate("spmvs configurator", 300, 200)

$sJAWS = "HKEY_LOCAL_MACHINESOFTWAREFreedom ScientificJAWS"

$hJAWS = GUICtrlCreateListView("volume", 10, 150, 140, 20)

_GUICtrlListView_SetExtendedListViewStyle($hJAWS, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))

_GetSubkey($sjaws)

$hSave = GUICtrlCreateButton("movefile", 50, 20)

$hCancel = GUICtrlCreateButton("close", 50, 20)

$hAbout = GUICtrlCreateButton("about", 50, 20)

GUISetState()

While 1

Switch GUIGetMsg()

Case 3, $hCancel

ExitLoop

case $HSave

;i don't know what i must write

case $hAbout

MsgBox(64, "about", 'SpmvsConfigurator Author beqa') ; Will demonstrate Button 2 being pressed

EndSwitch

WEnd

Func _GetSubkey($sjaws)

Local $iIndex = 1, $sSubKey

While 1

$sSubKey = RegEnumKey($sjaws, $iIndex)

If @error <> 0 Then ExitLoop

ConsoleWrite($sSubkey & @CRLF)

GUICtrlCreateListViewItem($sSubKey, $hjaws)

$iIndex += 1

WEnd

Return

EndFunc;==>_GetSubkey[ /autoit]

Share this post


Link to post
Share on other sites
water

Why do you want to move files? Doesn't JAWS (the screenreader) come with an installation program?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
beqa

ok i will explain.

yes jaws comes with installer, but in jaws you can write scripts to extend functional of screenreader.

i wrote scripts for jetaudio and want to make an installer which will move script files in to userprofile's folder.

it is %appdata%freedom scientificjawsversion.

from subkeys i can get folder paths.

Share this post


Link to post
Share on other sites
water

To move files use the - you guessed it - FileMove function.

I haven't done selecting entries of an ListView by checkboxes. But if you search the forum for $LVS_EX_CHECKBOXES you will find a lot of scripts which will show you how to code.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
beqa

ok, and finally question.

how i can display folders in scripts folder which is located in script folder.

e.g. with script.exe is located folder scripts and in scripts are located folders with dates. e.g. jetaudio scriptsforjaws 2011.12.13.

how i can display in first column all folders located in scripts and in second column dates?

Share this post


Link to post
Share on other sites
beqa

people please help me to display directories which are in scripts directory and scripts directory is in program directory

Share this post


Link to post
Share on other sites
water

_FileListToArray and then create the ListView from the returned array.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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
Sign in to follow this  

×