Jump to content

Recommended Posts

Posted

hi, i am new to autoit. I have to create search engine and database. Suppose , In the database we have to upload list of files from desktop and If i search for certain file, i have to select it and download the file.

Thanks

 

GUI.png

  • Moderators
Posted

price98,

Welcome to the AutoIt forums.

However, we do not just produce code for you - we help you get your code working properly. Think of the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever". We try to be net makers and repairers, not fishmongers.

So I suggest you look at the examples in the Help file for GUICreate, GUICtrlCreateButton, GUICtrlCreateInput & GUICtrlCreateList to get your GUI started - and _FileListToArray to get the files on your desktop. Have a go at producing something yourself and then post it (see here how to do it) - even if it does not do what you require. We can then start helping you to get it working as you wish.

M23

 

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted
  On 8/30/2018 at 9:37 AM, price98 said:

I did not know how to upload files from folder

Expand  

FileOpenDialog(), _FileListToArray(), _FileListToArrayRec().

  On 8/30/2018 at 9:37 AM, price98 said:

and download the selected files

Expand  

It depends from where you are trying to upload/download files.
Provide more information, so we could point you in the right direction :)

Click here to see my signature:

  Reveal hidden contents

 

Posted

FrancescoDiMuro

I have harddisk with list of files and connected to server , and i have to upload files from server to database  and download it in autoit.

 

Prince98

Posted

I am in starting stage. I did below one

 

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Pannel = GUICreate("Pannel", 615, 438, 192, 124)
$File = GUICtrlCreateMenu("File")
$Open = GUICtrlCreateMenuItem("Open"&@TAB&"Ctrl+O", $File)
$Save = GUICtrlCreateMenuItem("Save"&@TAB&"Ctrl+S", $File)
$Group1 = GUICtrlCreateGroup("Group1", 8, 40, 273, 169)
Global $UserInput = GUICtrlCreateEdit("", 16, 56, 185, 89)
Global $SaveButton = GUICtrlCreateButton("Save", 16, 160, 75, 25)
Global $DefaultButton = GUICtrlCreateButton("Default", 120, 160, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Group2", 8, 240, 273, 137)
GUICtrlSetBkColor(-1, 0x0066CC)
$Downloads = GUICtrlCreateCombo("Downloads", 24, 296, 161, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlCreateGroup("", -99, -99, 1, 1)
Dim $Pannel_AccelTable[2][2] = [["^o", $Open],["^s", $Save]]
GUISetAccelerators($Pannel_AccelTable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Downloads
            $DatafromFile = GUICtrlRead($File)
            $OpenLocation = FileOpenDialog("Open File", @ScriptDir, "Text Files ('*')")
            FileWrite($OpenLocation, $DatafromFile)

        Case $UserInput = GUICtrlRead($UserInput)
            $SaveLocation = FileSaveDialog("Save File", @ScriptDir, "Text Files ('*')")
            FileWrite($SaveLocation, $UserInput)

        Case $DefaultButton
            GUICtrlSetData($UserInput,'This is default information')

    EndSwitch
WEnd

 

Posted

@FrancescoDiMuro

 

At the starting of this topic discussion. I uploaded a figure .In a hard disk, I have list of files .I will connect hard disk to system. I have to upload the files to database (local server). After that, I have to search for file and select that file and download it

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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