Jump to content

Search the Community

Showing results for tags 'Create'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 22 results

  1. hello guys, please i need your help am trying to work with CreateWindowEx api, i created the window with it controls, also i setup the call back function i'am using WinMSGLoop to focus with the keyboard. here i have a problem, i hope that you can help me. on the controls i used the UDF that comme with the autoit, such as _GUIButton_Create, _GUIListBox_Create.... but i can't find a STATIC control UDF, for that i used this local $h_ssrvlbl = _WinAPI_CreateWindowEx(0, "STATIC", "الخادم", BitOr($WS_VISIBLE, $WS_CHILD, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN), 250, 10, 100, 20, $hWnd) as you can see here, there is an arabic text, so here is the problem, the arabic text isn't show normally, what is the problem here? also i have an other question about keyboard focus, when i used WinMSGLoop, it worked, but if i press alt+tab to switch windows or focus an other window and return back to my window, the focus of control is kill. can any one help me to solve that please? my code will be as file here with the include files i hope can any one help me here thanks in advance speed Test win.zip
  2. Hello, I am new to AutoIt so please bare with me. I am trying to write a script that installs a certain program on Win 10 and then based on a successful install create a file in a specific directory. Below is my install script which works, just not quite sure how to get it to write the file when its done. My thought is to add a "If FileExists" command at the end to make sure that the files are in the install folder and based on that write the file just not sure how to accomplish it. I hope that makes sense and thank you in advance for any help. Local $Title="MobilePass Install" Local $FilePATH="\\XXXXXXX\XXXXXX" Local $UserName "*****8" Local $Password = "*******8" ;Check if Application location already exists If FileExists ("C:\Program Files\WindowsApps\05EB1CFA.SafeNetMobilePASS_1.8.3.0_x64__bnm8hg3x9na9j") Then Exit Else Local $pid = RunAsWait ($UserName, $ComputerDomainName, $Password, 1, "MobilePASS+Setup_1.8.3.0_signed.exe", "", @SW_HIDE ) Endif
  3. question about _WinAPI_CreateWindowEx good morning welcome autoit team please i need your help i've searched a lot about how to use the _WinAPI_CreateWindowEx finally i found an example but i found some problem i hope you can help me firstly, i want to set the controls focussable with the keyboard input i already used the ws_tabStop but it did not work with me. secondly, i want to set some access keys linked with the window such as control+o enable the open button and control+f4 exit the app note: i need a local access keys and not a global hotkeys such as GUISetAccelerators finaly, before i will put the code here i must clarify a few things. 1. you will ask me why you don't use the GUICreate function here i'll tell you that it as dialog and It is a little heavy in motion with screen readers. the screen readers for blind has some function that work with dialogs and others work with full windows style 2. you will ask me why you didn't search the net for that? i will tell you that all examples that i found in the internet with pdfs and Picture books. i found some examples in microsoft but it with cpp. ok here is the code i hope you can help me to do what i want thank you in advance ; Small AutoIt Application that uses Windows API ; Written by Yuraj #NoTrayIcon #include <_RegisterClassEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <FontConstants.au3> AutoItSetOption("MustDeclareVars", 1) ; Window definitions Const $WinWidth = 370 Const $WinHeight = 350 Const $WinXPos = (@DesktopWidth / 2) - ($WinWidth / 2) Const $WinYPos = (@DesktopHeight / 2) - ($WinHeight / 2) Const $WinTitle = "Win32 Application - Text reader" Const $WinClass = "mainapp" Const $WinIcon = _WinAPI_LoadIcon(_WinAPI_GetModuleHandle("shell32.dll"), 13) ; Windows handles Global $hwnd, $edit1, $btn1, $btn2 ; Fonts Global $fnt1 ; Register class, Create the window Local $retVal = __WinAPI_RegisterClassEx($WinClass, "WindowCallback", $WinIcon, 0, _WinAPI_GetSysColor($COLOR_BTNFACE), BitOR($CS_DEFAULTSTYLE, $CS_DROPSHADOW)) ; If $retVal == 0 Then ; If registerclass fails MsgBox(16, "Error", "Error while registering window class!") Exit EndIf ; Create windows/controls $hwnd = _WinAPI_CreateWindowEx($WS_EX_STATICEDGE, $WinClass, $WinTitle, BitOR($WS_OVERLAPPED,$WS_SYSMENU, $WS_MINIMIZEBOX, $WS_GROUP, $WS_DLGFRAME), $WinXPos, $WinYPos, $WinWidth, $WinHeight, 0) $btn1 = _WinAPI_CreateWindowEx(0, "button", "Open file ...", BitOR($WS_VISIBLE, $WS_CHILD, $WS_TABSTOP, $WS_CLIPCHILDREN), 25, 270, 100, 30,$hwnd) $btn2 = _WinAPI_CreateWindowEx(0, "Button", "Exit", BitOR($WS_VISIBLE, $WS_CHILD, $WS_TABSTOP, $WS_CLIPCHILDREN), 235, 270, 100, 30, $hwnd) $edit1 = _WinAPI_CreateWindowEx(0, "edit", "text", BitOR($WS_VISIBLE, $WS_CHILD, $WS_VSCROLL, $ES_AUTOVSCROLL, $es_readOnly, $WS_TABSTOP), 5, 5, $WinWidth - 15, $WinHeight - 100, $hwnd) ; Set controls identifiers _WinAPI_SetWindowLong($btn1,$GWL_ID,150) _WinAPI_SetWindowLong($btn2,$GWL_ID,160) ; Set (controls) fonts $fnt1 = _CreateFont("MS Sans Serif", 15) _WinAPI_SetFont($btn1, $fnt1) _WinAPI_SetFont($btn2, $fnt1) _WinAPI_SetFont($edit1, $fnt1) ; Set focus to edit _WinAPI_SetFocus($edit1) ; Show window _WinAPI_ShowWindow($hwnd) _WinAPI_UpdateWindow($hwnd) ; Main loop that keep application opened While 1 Sleep(100) WEnd ;=================================================================; ; WINDOW CALLBACK ... ;=================================================================; Func WindowCallback($_hwnd, $iMsg, $wParam, $lParam) Local $iNC, $iID Switch $iMsg ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $WM_CLOSE ; Show message on closing If MsgBox(48 + 4, $WinTitle, "Do you want really exit?", 0, $hwnd) <> 6 Then Return 0 ; Call destructor and then exit main thread FinalizeApp() Exit ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $WM_COMMAND $iNC = _WinAPI_HiWord($wParam) $iID = _WinAPI_LoWord($lParam) Switch $iNC Case $BN_CLICKED ; When is control clicked Switch _WinAPI_GetDlgCtrlID($iID) Case _WinAPI_GetDlgCtrlID($btn1) BtnOpenFileClick() Case _WinAPI_GetDlgCtrlID($btn2) BtnExitClick() EndSwitch EndSwitch ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndSwitch Return _WinAPI_DefWindowProc($_hwnd, $iMsg, $wParam, $lParam) EndFunc ;==>WindowCallback Func FinalizeApp() _WinAPI_DeleteObject($fnt1) _WinAPI_DestroyWindow($hwnd) __WinAPI_UnregisterClass($WinClass) EndFunc ;==>FinalizeApp Func _CreateFont($fontName, $height = 16, $style = $FW_NORMAL, $italic = False, $underline = False, $strikeout = False) Local $hFont = _WinAPI_CreateFont($height, 0, 0, 0, $style, $italic, $underline, $strikeout, $DEFAULT_CHARSET, _ $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, $DEFAULT_PITCH, $fontName) Return $hFont EndFunc ;==>_CreateFont ;=================================================================; ; WINDOW EVENTS ;=================================================================; Func BtnOpenFileClick() Local $ret = _WinAPI_GetOpenFileName("", "Text files (*.txt)|All files (*.*)", ".", "", "", 1, 0, 0, $hwnd) If ($ret[0] > 0) Then Local $path = $ret[1] & "\" & $ret[2] Local $file = _WinAPI_CreateFile($path, 2, 2) Local $buf = DllStructCreate("byte[" & _WinAPI_GetFileSizeEx($file) & "]") Local $i = 0 _WinAPI_ReadFile($file, DllStructGetPtr($buf), _WinAPI_GetFileSizeEx($file), $i) ; Close file handle _WinAPI_CloseHandle($file) _WinAPI_SetWindowText($edit1, BinaryToString(DllStructGetData($buf, 1))) EndIf EndFunc ;==>BtnOpenFileClick Func BtnExitClick() FinalizeApp() Exit EndFunc ;==>BtnExitClick _RegisterClassEx.au3
  4. hello sirs, please help me i tried to create a function that read a folder files to 3d array e.g $array[n][0][0] = ctName $array[n][0][1] = ctFilePath $array[n][0][2] = crtsections number $array[n][m][0] = KeyName $array[n][m][1] = KeyVal $array[n][m][2] = keySectionName that the array when i put one file into the folder all things work fine but when i put more than one file the last file worked fine but the others only the first key is showing please can you help me to correct this problem here is the example with the folder please accept my greetings and thanks in advance array3d.zip
  5. Hello my friends I have an inquiry and I hope to find the answer here I want to create a graphical user interface but I want to hide the system menu I mean the window menu Is this possible? If is possible please give me how to do that Thanks in advance
  6. Hello all I have a question please this a question is about the context menu When i create a list box Or combo box if i create a context menu for this list When i press the application key or the shortcut shift + f10 the menu options is appear normally but When i create a List view if i create a context menu for this list When i press the application key or the shortcut shift + f10 the menu options isn't appear But the right mouse button works normally I need a solution please because I deal with the screen readers users Unfortunately They can not use the mouse to navigate So I have to find a solution to activate keyboard shortcuts am waiting for your help
  7. can we create a list box with Columns? welcome everybody Dears I have a question if you let me can we create a list box with Columns? i know we can create a list view with Columns but my question is about the list box I'm waiting your responses Thank you in advance
  8. Hi dear I want create retractable bar using autoit I tried creating slider, but there's a problem with screen reader for the blind, so is there another retractable tape? It is advisable to not accept dragging with the keybord only with mouse note: This bar is needed in the process of raising and lowering the volume I hope that there is a solution to do that i waiting your responses. Thanks in advance to all members and administrators
  9. Hi all, I hope you can help me with this need. In the company I work for, every time we need to deploy a change into a Production environment, we need to add a SharePoint entry in a Calendar area. This is in order to notify Operations team that a change will be introduced on a specific date. The fields we need to fill out are: ows_Project ows_ChangeReq ows_Description ows_StartDate ows_EndDate The thing is that, I have all these values available in an AutoIT application I built called EAI Tool so, what I need is: Whenever a user click a button, a SharePoint record should be created populating SharePoint fields with the values from EAI Tool applicacion. If you need additional information, let me know. Regards,
  10. Hi dears How are you? I have a question, to you please. How do I create an edit box for numbers only and does not accept letters? using autoit greetings to all I hope you help ME Thanks to all in advance
  11. please help, how to write script for multiple choice question in GUI -single program -add more question to program example: 1. this is the question a. answer a b. answer b c. answer c d.answer d - 300 questions + 700 answers please give me some tips to create a script read and write file from notepad, that mean u need notepad attach?
  12. Good morning I was looking around the forum if there were some customizable solutions about creating a PDF from "0" to something like a report... What I'd like to do is something with a header ( 2 logos and a title ), with a table which contains data read from a file At the moment, I was working with HTML, since I know it and it's very simple to do a table with some data inside... But know, I'm a bit stuck about the exporting the HTML page to PDF... And, here too, if someone knows how to do it, please, I'm here listening Thanks guys
  13. I'm new to scripting and Autoit, but i've already found some things that I would like to create. Where do you start when creating a UDF? For instance, if I wanted to make a UDF for Excel(I know one exists) Where would I start? What would I need to start researching? Any input would be appreciated
  14. Hello. First of all, my full code: #include <WinAPI.au3> #include <File.au3> #include <String.au3> Local $aFiles, $IntOrFloat Local $aFileToRead = _WinAPI_GetOpenFileName("Open file to read", "Text Files (*.txt)") Local $aFinalFile = _WinAPI_GetSaveFileName("How do you want to save the file?", "Text Files (*.txt)") Local $sFilenameWithoutExtension = _StringBetween($aFinalFile[2],"",".") Local $sLinesPerLine = InputBox("Lines Per Line", "How many lines per line do you want?","","") Local $sCountLines = _FileCountLines($aFileToRead[2]) If ($sCountLines/$sLinesPerLine) >= 1 Then ; When the division result is a number with decimal, there will be less words in the last file and the script won't create it , therefore I add 1 to the result to prevent a file lack. Am I wrong? For example: if user introduces 3 the operation will be "4/3=1.33" and I need two files, the first "line1,line2,line3" and the second "line4". $IntOrFloat = $sCountLines/$sLinesPerLine Else $IntOrFloat = ($sCountLines/$sLinesPerLine) + 1 EndIf For $i = 1 To $IntOrFloat MsgBox(0,"", "Creating file " & $i) $aFiles = $aFinalFile[1] & "\" & $sFilenameWithoutExtension[0] & "-" & $i & ".txt" _FileCreate($aFiles) FileOpen($aFiles,2) For $a = ( ( ( $i - 1 ) * $sLinesPerLine ) + 1 ) To ( $i * $sLinesPerLine ) FileWrite($aFinalFile[2],FileReadLine($aFileToRead[2], $a) & ",") Next FileClose($aFiles) Next MsgBox(0,"Done","Done")With it I want to read a text file with a lot of lines and I wanna split it in multiple files with multiple lines (of the first file) in each line, separated by commas. For example: the user executes the script and selects a text file to open that contains: Then, the user selects the path and name of the result files. Suppose "C:\result.txt" Finally, the user introduces the number of lines per line (lines of the initial text file to each line of the result text files). Suppose the user enters 2. So far my code works fine. But I tried to code a loop for do (continuing the example): Start first loop repetition.Create "C:\result.-1.txt", and write on it "Line 1 asdf,Line 2 asdf"End first loop repetition.Start second loop repetition.Create "C:\result.-2.txt", and write on it "Line 3 asdf,Line 4 asdf"End second loop repetition.But my code results (continuing the example) in three files created: C:\result.txt that contains "Line 1 asdf,Line 2 asdf,Line 3 asdf,Line 4 asdf,"C:\result.-1.txt that contains nothing.C:\result.-2.txt that contains nothing.Where is the error? I can't understand where is it...
  15. Hi guys, i am working with Mozilla and chrome udf and since i can't find these two functions i need: _IEFrameGetCollection_IETagNameGetCollection I thought i can create them myself at the udf source codes or i dont know.. can anyone tell me the path where to go so i can create these functions that exist for internet explorer but not for mozilla, chrome or other browsers.....
  16. Well. I was needing to create a networks shortcut. so I did find anything into the forum. So I write this after reading about Nonfile Object. ;~ Danyfirex 26/07/2015 #include <WinAPIShellEx.au3> Opt("MustDeclareVars", 1) Global Const $SHCONTF_NONFOLDERS = 0x00040 Global Const $SHGDN_NORMAL = 0 Global Const $S_OK = 0 Global Const $sTagSTRRET = "UINT uType;ptr pOleStr;UINT uOffset;CHAR cStr[256]" Global Const $CLSID_ShellLink = "{00021401-0000-0000-C000-000000000046}" Global Const $sIID_IShellLinkW = "{000214F9-0000-0000-C000-000000000046}" Global Const $sTagIShellLink = "getpath hresult(long;long;long;long); " & _ "getidlist hresult(ptr); " & _ "setidlist hresult(ptr); " & _ "getdescription hresult(long;long); " & _ "setdescription hresult(wstr); " & _ "getworkingdirectory hresult(long;long); " & _ "setworkingdirectory hresult(long); " & _ "getarguments hresult(long;long); " & _ "setarguments hresult(ptr); " & _ "gethotkey hresult(long); " & _ "sethotkey hresult(word); " & _ "getshowcmd hresult(long); " & _ "setshowcmd hresult(int); " & _ "geticonlocation hresult(long;long;long); " & _ "seticonlocation hresult(wstr;int); " & _ "setrelativepath hresult(long;long); " & _ "resolve hresult(long;long); " & _ "setpath hresult(wstr)" Global Const $sIID_IPersistFile = "{0000010b-0000-0000-C000-000000000046}" Global Const $sTagIPersistFile = "GetClassID hresult(long); IsDirty hresult(); Load hresult(long;long); Save hresult(wstr;bool); SaveCompleted hresult(long); GetCurFile hresult(long)" Global Const $sIID_IEnumIDList = "{000214F2-0000-0000-C000-000000000046}" Global Const $sTagIEnumIDList = "Next hresult(ulong;ptr*;ulong*);" & _ "Reset hresult();" & _ "Skip hresult(ulong);" & _ "Clone hresult(ptr*);" Global Const $sIID_IShellFolder = "{000214E6-0000-0000-C000-000000000046}" Global Const $sTagIShellFolder = "ParseDisplayName hresult(hwnd;ptr;wstr;ulong*;ptr*;ulong*);" & _ "EnumObjects hresult(hwnd;dword;ptr*);" & _ "BindToObject hresult(ptr;ptr;clsid;ptr*);" & _ "BindToStorage hresult(ptr*;ptr;clsid;ptr*);" & _ "CompareIDs hresult(lparam;ptr*;ptr*);" & _ "CreateViewObject hresult(hwnd;clsid;ptr*);" & _ "GetAttributesOf hresult(uint:ptr*;ulong*);" & _ "GetUIObjectOf hresult(hwnd;uint;ptr*;clsid;uint*;ptr*);" & _ "GetDisplayNameOf hresult(ptr;dword;ptr);" & _ "SetNameOf hresult(hwnd;ptr*;wstr;dword;ptr*);" Local $MyNetWorkConnectionName="Conexión de red inalámbrica" CreateNetWorkConnectionShortCut($MyNetWorkConnectionName) ;~ Success: Return True ;~ Failure: Return False ;~ if $lnkPath = "" ShortCut will be Create on Desktop with the name of the Conections($sConnectionName) Func CreateNetWorkConnectionShortCut($sConnectionName, $lnkPath = "") Local $pConecctionsFolder = 0 Local $oConecctionsFolder = 0 Local $pEnumIDList = 0 Local $oEnumIDList = 0 Local $pPIDLItem = 0 Local $celtFetched = 0 Local $pPIDLConectionsFolder = 0 Local $bRet = False Local $tSTRRET = 0 Local $twstring = 0 Local $pShellFolder = SHGetDesktopFolder() Local $oShellFolder = ObjCreateInterface($pShellFolder, $sIID_IShellFolder, $sTagIShellFolder) If @error Then Return $bRet $pPIDLConectionsFolder = _WinAPI_ShellGetSpecialFolderLocation($CSIDL_CONNECTIONS) If SUCCEEDED($oShellFolder.BindToObject($pPIDLConectionsFolder, Null, $sIID_IShellFolder, $pConecctionsFolder)) Then $oConecctionsFolder = ObjCreateInterface($pConecctionsFolder, $sIID_IShellFolder, $sTagIShellFolder) If IsObj($oConecctionsFolder) Then If SUCCEEDED($oConecctionsFolder.EnumObjects(Null, $SHCONTF_NONFOLDERS, $pEnumIDList)) Then $oEnumIDList = ObjCreateInterface($pEnumIDList, $sIID_IEnumIDList, $sTagIEnumIDList) If IsObj($oEnumIDList) Then $tSTRRET = DllStructCreate($sTagSTRRET) While (SUCCEEDED($oEnumIDList.Next(1, $pPIDLItem, $celtFetched)) And $celtFetched > 0) If SUCCEEDED($oConecctionsFolder.GetDisplayNameOf($pPIDLItem, $SHGDN_NORMAL, DllStructGetPtr($tSTRRET))) Then $twstring = DllStructCreate("wchar Name[512]", $tSTRRET.pOleStr) If $twstring.Name = $sConnectionName Then If $lnkPath = "" Then $lnkPath = @DesktopDir & "\" & $twstring.Name & ".lnk" $bRet = CreateLnk($pPIDLConectionsFolder, $pPIDLItem, $lnkPath) ExitLoop EndIf $twstring = 0 EndIf WEnd EndIf EndIf EndIf EndIf If $pPIDLConectionsFolder Then _WinAPI_CoTaskMemFree($pPIDLConectionsFolder) Return $bRet EndFunc ;==>CreateNetWorkShortCut Func CreateLnk($PIDL1, $PIDL2, $lnkPath) Local $oShellLink = 0 Local $oIPersistFile = 0 Local $pIPersistFile = 0 Local $pAppendID = 0 Local $bRet = False $oShellLink = ObjCreateInterface($CLSID_ShellLink, $sIID_IShellLinkW, $sTagIShellLink) If @error Then Return $bRet $pAppendID = ILAppendID($PIDL1, $PIDL2) If IsObj($oShellLink) And $pAppendID Then If SUCCEEDED($oShellLink.SetIDList($pAppendID)) Then $oShellLink.QueryInterface($sIID_IPersistFile, $pIPersistFile) $oIPersistFile = ObjCreateInterface($pIPersistFile, $sIID_IPersistFile, $sTagIPersistFile) If IsObj($oIPersistFile) Then $bRet = SUCCEEDED($oIPersistFile.Save($lnkPath, True)) EndIf EndIf EndIf Return $bRet EndFunc ;==>CreateLnk Func ILAppendID($PIDLIST_RELATIVE, $LPSHITEMID, $fAppend = True) Local $aRet = DllCall("Shell32.dll", "ptr", "ILAppendID", "ptr", $PIDLIST_RELATIVE, "ptr", $LPSHITEMID, "bool", $fAppend) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] = 0 Then Return SetError(10, $aRet[0], 0) Return $aRet[0] EndFunc ;==>ILAppendID Func SHGetDesktopFolder() Local $aRet = DllCall("Shell32.dll", "long", "SHGetDesktopFolder", "ptr*", Null) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] Then Return SetError(10, $aRet[0], 0) Return $aRet[1] EndFunc ;==>SHGetDesktopFolder Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED Saludos
  17. Hi, Here is an UDF to create, delete, set the icon and state, tooltip and tip for your notify icons. The main advantage is that you can handle mouse events as you want, there is no default events. You can create fully customised notifyicons/tooltips. Thanks to Holger Kotsch for his ModernMenu UDF. Note : Breaking changes ! Please use the 1.2+ version. Functions : Attachments : Example + UDF : AutoIt v3.3.10.0+ NotifyIcon_1.2.zip TrayIconEx_1.1.zip AutoIt v3.3.8.0+ TrayIconEx.zip & Requirements : >WinAPIEx UDF. As usual, enjoy !
  18. Hello again, I'm trying to create a script which will create a folder/file structure. Example: projectname projectnameindex.php projectnamehtml projectnamehtmlindex.html projectnamecss projectnamecssindex.css here's what i have so far: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #region program form $FORM = GUICreate("website folder builder v1 by g3mini", 216, 99, 192, 124) $PHP = GUICtrlCreateCheckbox("", 56, 30, 17, 25) $HTML = GUICtrlCreateCheckbox("", 56, 49, 17, 25) $CSS = GUICtrlCreateCheckbox("", 56, 68, 17, 25) $PHPLABEL = GUICtrlCreateLabel("PHP", 24, 35, 26, 17) $HTMLLABEL = GUICtrlCreateLabel("HTML", 18, 56, 34, 17) $CSSLABEL = GUICtrlCreateLabel("CSS", 25, 77, 25, 17) $NAME = GUICtrlCreateInput("project name", 80, 5, 121, 21) $NAMELABEL = GUICtrlCreateLabel("project name", 8, 8, 65, 17) $GO = GUICtrlCreateButton("create website", 80, 32, 123, 49) GUICtrlSetFont(-1, 35, 400, 0, "Parchment") GUISetState(@SW_SHOW) #endregion program form $PHPP = 0 $HTMLL = 0 $CSSS = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $FORM Case $FORM Case $FORM Case $FORM Case $PHP $PHPP = 1 Case $HTML $HTMLL = 1 Case $CSS $CSSS = 1 Case $PHPLABEL Case $HTMLLABEL Case $CSSLABEL Case $NAME Case $NAMELABEL Case $GO $naam = GUICtrlRead($NAME) DirCreate($naam) If ($PHPP == 1) Then FileWrite($naam"\index.php", "<?php") EndIf If ($HTMLL == 1) Then DirCreate($naam"\html") FileWrite($naam"\html\index.html", "") EndIf If ($CSSS == 1) Then DirCreate($naam"\html\css") FileWrite($naam"\html\css\index.css", "") EndIf EndSwitch WEnd I get errors on the $naam"html" etc, Could anyone please tell me how to add *normal text* to a variable so that i get the following example: $naam = "websitetest" and then it creates "websitetestindex.php" thanks =) dh.
  19. I can open an Internet Explorer Window without a toolbar with this: #include <IE.au3> $ie = _IECreate('www.example.com', 0, 0, 0) _IEPropertySet($ie, "toolbar", False) $IE.Visible = 1 I can open a Google Chrome Window with a toolbar with this: ShellExecute("chrome.exe", "www.example.com","","") The question is, how can I create a Google Chrome Window without a toolbar?
  20. For example my GUICtrlCreateEdit() contains: Line 1 Line 2 Line 3 When I IniWrite() the content of it, the value will be look like this: [SectionName] Key=Line 1 Line 2 Line 3 But when I IniRead() that key like this: GUICtrlCreateEdit(IniRead(@ScriptDir & "/data.ini", "SectionName", "Key", ""), 1, 1, 200, 100) The value of the GUI edit field is only "Line 1".. How can I INI write and read a text with line breaks in a GUICtrlCreateEdit() ?
  21. I am trying to add a specific icon or image to a specific ListView Item . I add the items in the ListView control with this command : _GUICtrlListView_AddItem . Right now what I only managed to do is to add an icon for ALL the items in the control, BUT, if I try to add an icon to only one item , its just impossible Atleast for me >_< I have tried GUICtrlSetImage(-1, "C:icon.ico") tried with creating _GUIImageList_Create , icons not transparent , 16x16 pixels, tried many other icons, tried with .bmp, .png - nothing worked so far O_O ! Anyone yet managed to do something with this problem so far? Thanks
  22. Alright, So I am trying to make an autoit script to create a file and I just looked at the example on the function page for FileWriteLine everything seemed to make since so I added a GUISetOnEvent so that when the "done" button is pressed it will create a file with text in it and it will continue to write the text in it over and over again... I am just trying to get this to work before I do any other stuff. So I used Koda to make the gui real fast (that was the easy part) and I exported it etc and I added the GUISetOnEvent and the function from the FileWriteLine example and it doesn't work. I did get it to work once though but I had to generate the code from Koda with events on everybutton which then left minimize and close useless, so creating a file with text in it worked but closing the application itself didn't which was pretty useless. My question is "How do I make the FileWriteLine actually work?". With this code right now it will not create test.txt with "Line1 Line2 Line3" written in it. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:UsersjustinDesktopcreat-vhostvhost-gui.kxf $Form1 = GUICreate("Create a new vHost for localdev", 401, 201, 325, 193) GUISetBkColor(0xFFFFFF) $website = GUICtrlCreateInput("", 16, 40, 361, 21) GUICtrlSetCursor (-1, 2) $website_label = GUICtrlCreateLabel("Website Name ( Do not provide the extension ex. graphtek.com = graphtek )", 16, 16, 364, 17) $done = GUICtrlCreateButton("Done", 304, 160, 73, 33) GUICtrlSetOnEvent($done, "doneClick") $coldfusion = GUICtrlCreateCheckbox("Is this a coldfusion site?", 16, 72, 281, 20) $directory_edit = GUICtrlCreateButton("Edit Directories", 16, 160, 105, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func doneClick() Local $file = FileOpen("test.txt", 1) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, "Line1") FileWriteLine($file, "Line2" & @CRLF) FileWriteLine($file, "Line3") FileClose($file) EndFunc
×
×
  • Create New...