Leaderboard
Popular Content
Showing content with the highest reputation on 01/05/2018 in all areas
-
Impressive work Xandy! I downloaded the zip and ran the Map Editor, works very well indeed! I should make time to look and study your code, keep up the good work2 points
-
NOTE: TOPIC HAS BEEN MERGED TO HERE: MapIt Quest I am currently developing NPCs they cannot yet be added. Items only exist in database. Enemies only in sprite. This project has been on the shelf a couple years. I decided to learn DLLStruct at the beginning of this project. I'm not sure if using them was a good idea or not. I'm open to converting them to pure array and Enum. Developing multiplayer system UDP clients / server. I'm looking for some advice on how to setup the packets. I was thinking the best way was to convert packets to Hex and convert back at the destination. That's probably the way I have it setup. Anyhow they all talk to each other, clients and server. Where the avatars appear on screens doesn't work. My Enums are used for data members of arrays. I exclude the 'g' even though they are all Global. I put the array names they describe in the Enum: ePlayer_x. In some cases I abbreviate the array name; aWorld_info probably has: aWorld_info[eWi_layers] Most gaming things are done better with a nice engine: GameMaker, Unity, Unreal. My buddy made a time machine in BASIC. I know you can make a better time machine in other languages, but there is something to be said for doing it in BASIC. Many things are ugly with this, just broken, or extraneous blocks of code I threw together for some one-off task. I put this here to see if it generates interest. I'm happy to change this thing around. I do many things in favor of speed, but I know some of it's crap. Package contains a Server and a Map Editor. The Map Editor is meant to be able to add and edit: World Files, worlds have 2 layers. 0.txt background 1.txt forground. The files are formatted with a header: width, height, and the largest tile number. The largest tile number is used to pad the world files. So that the world files could be edited by hand. WorldN Tile X_Y.txt (a subset cord of tile to specify frame): World Tile X_Y is stored in a separate file per layer so that the world layer files remain pretty. World Directory Structure: Example: World_1_Overworld. In folder above we can notice only layer 1 has a Tile_X_Y file. This is because atm only trees use the system and trees are foreground. Areas: areas are to subdivide worlds in effort to section the worlds and divide lists for: hotspots, NPCs, Items, and area properties such as: Out-of-Bounds: Destination and Repeat Tile, enemy encounters, etc.. Areas have: Global Enum $eArea_x, $eArea_y, $eArea_w, $eArea_h, _ ; Area World Bound Rect $eArea_ob_tile, $eArea_ob_world, $eArea_ob_x, $eArea_ob_y, _ ; Out of Bounds Repeat Tile and World Destination if Out of Bounds $eArea_hotspots, $eArea_items, $eArea_NPCs ; Total Hotspots per Area, Items and People Hotspots: hotspots are locations on the board that relocate the player Global Enum $eHotspot_x, $eHotspot_y, _; the spot in world that moves player $eHotspot_dest_world, $eHotspot_dest_x, $eHotspot_dest_y; the destination world and position Board: A rectangle of world tiles is pre-drawn on aBoard[layer_max] centered on player, you can change the size to consume less RAM but requires drawing world to board more often. Animated Background: Before anything is drawn a moving BG image is drawn. Creating beautiful water AI. So if no tiles are drawn from world, BG water animation is shown. Map Editor should be able to test all of the systems of the game: Player, Worlds, Areas, Hotspots, NPCs, Items, Shops, Battles, Netplay, etc.. (Not all systems exist yet) Download site: http://songersoft.com/programming/dw3_remake/dw3_remake_about.phtml It's going to say that the files might be malicious. Probably b/c of the DLLs and I hosted an unmoderated forum from the site years ago were people posted malicious links. Let me know if it's malicious! PS: I tried posting the source but I keep getting errors. I think the source might be too large to post. 6308 lines. Idk.1 point
-
Version 0.4.0.1
1,465 downloads
Extensive library to control and manipulate Microsoft Excel charts. Written by GreenCan and water. Theads: General Help & Support - Example Scripts BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2017-07-21) None. The COM error handling related bugs have been fixed.1 point -
An oldie but goodie, I was cleaning house and found this old snippet I made back in Apr 2013. It still has some utility, so I figured I'd share it. It runs netstat and populates the output into an array. Very Pretty simple. #include <Constants.au3> #include <Process.au3> #include <Array.au3> Local $aNetStatData = _NetStat_GetData() Local $sHeaders = _ArrayToString($aNetStatData,"|",0,0) _ArrayDelete($aNetStatData, 0) _ArrayDisplay($aNetStatData,"NetStat", "", 32, Default, $sHeaders) Func _NetStat_GetData($bAddProcessName = True) Local $aNetStatData = _NetStat_ProcessOutput(_NetStat_GetOutput()) If $bAddProcessName Then _NetStat_AddProcessName($aNetStatData) Return $aNetStatData EndFunc Func _NetStat_GetOutput() ;Run netstat CMD and get StdOut Local $sNetStatOutput = _RunCMD("netstat.exe -a -o -f") Return $sNetStatOutput EndFunc Func _NetStat_ProcessOutput($sNetStatOutput) ;Convert netstat StdOut to Array Local $arr = StringSplit(StringStripWS($sNetStatOutput,4),@CR) Local $aRecord Dim $aNetStatData[1][5]=[["Protocol","Local Address","Foreign Address","State","PID"]] ReDim $aNetStatData[$arr[0]-3][5] For $iX = 1 To UBound($aNetStatData)-1 $aRecord = StringSplit($arr[$iX+3]," ") If $aRecord[1]="TCP" Then For $iY = 0 to $aRecord[0]-1 $aNetStatData[$iX][$iY] = $aRecord[$iY+1] Next ElseIf $aRecord[1]="UDP" Then For $iY = 0 to $aRecord[0]-2 $aNetStatData[$iX][$iY] = $aRecord[$iY+1] Next $aNetStatData[$iX][4] = $aRecord[4] EndIf Next Return $aNetStatData EndFunc Func _NetStat_AddProcessName(ByRef $aNetStatData) ;Add processname to NetStat Array ;Create NetStat PID / Process Name Array Local $aPIDs = _ArrayUnique($aNetStatData,4,0,0,0) _ArrayColInsert($aPIDs,1) $aPIDs[0][1] = "Process Name" For $iX = 1 To UBound($aPIDs)-1 $aPIDs[$iX][1] = _ProcessGetName($aPIDs[$iX][0]) Next ;Add Process Names to NetStat Array _ArrayColInsert($aNetStatData,5) $aNetStatData[0][5] = "Process Name" For $iX = 1 to UBound($aNetStatData)-1 Local $sProcessName = $aPIDs[_ArraySearch($aPIDs, $aNetStatData[$iX][4])][1] If $sProcessName Then $aNetStatData[$iX][5] = $sProcessName Next EndFunc Func _RunCMD($sCMD) ;Run CMD and Return StdOut Local $iPID = Run(@ComSpec & " /c " & $sCMD, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $sStdOut While 1 $sStdOut &= StdoutRead($iPID) If @error Then ExitLoop WEnd Return $sStdOut EndFunc1 point
-
_NetStat_GetData
Earthshine reacted to Draygoes for a topic
Thanks for this man. I can get a lot of use out of it.1 point -
True, but the same bits version will be used for running and compiling, so when running works I would assume that a compiled version also works as far as the 32/64 bits potential issues. Agree? Jos1 point
-
Autoit script in Inno setup
Earthshine reacted to careca for a topic
Essencially, this can be resumed as: The exe runs as expected if you run it yourself, but when run through another application, it only moves the files, not the dir. Can you test if the behaviour is the same when ran through a batch file for example? Can you test it with #requireadmin ? When you say only the files are moved, where are they moved? That seems odd, do they move from the subfolders to one specific folder? All together in only one folder?1 point -
If you could tell us what this code snippet is intended to do we might assist in writing something in AutoIt.1 point
-
Use Local $TRY_ID = $aHit[0] instead this Local $TRY_ID = _GUICtrlListView_GetHotItem($hListView) Saludos1 point
-
Thank you for trying it and confirming it works. Best present I could get this morning1 point
-
This works for me. #include <GuiMenu.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> ; ======================================================================== ; Global variables ; ======================================================================== Global Enum $idEdit = 1000, $idDelete, $idAdd ; ======================================================================== ; Main ; ======================================================================== $hGUI = GUICreate('Context Menu Demo (Right Click)', 400, 300) $hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 394, 268) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($hListView, $hImage, 1) ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 200) ; Add items _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1) _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2) GUISetState() ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func ListView_RClick() Local $aHit $aHit = _GUICtrlListView_SubItemHitTest($hListView) If ($aHit[0] <> -1) Then ; Create a standard popup menu ; -------------------- To Do -------------------- $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_AddMenuItem($hMenu, "Edit", $idEdit) _GUICtrlMenu_AddMenuItem($hMenu, "Delete", $idDelete) ; ======================================================================== ; Shows how to capture the context menu selections ; ======================================================================== Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hListView, -1, -1, 1, 1, 2) Case $idEdit _DebugPrint("Edit: " & StringFormat("Item, SubItem [%d, %d]", $aHit[0], $aHit[1])) Case $idDelete _DebugPrint("Delete: " & StringFormat("Item, SubItem [%d, %d]", $aHit[0], $aHit[1])) EndSwitch _GUICtrlMenu_DestroyMenu($hMenu) Else ; Create a standard popup menu ; -------------------- To Do -------------------- $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_AddMenuItem($hMenu, "Add", $idAdd) ; ======================================================================== ; Shows how to capture the context menu selections ; ======================================================================== Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hListView, -1, -1, 1, 1, 2) Case $idAdd _DebugPrint("Add a New Item.") EndSwitch _GUICtrlMenu_DestroyMenu($hMenu) EndIf EndFunc ;==>ListView_RClick Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) ;$iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the left mouse button ListView_RClick() Return 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_text, $line = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @LF & _ "+======================================================" & @LF & _ "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _ "+======================================================" & @LF) EndFunc ;==>_DebugPrint Saludos1 point
-
Run setup.exe minimized or hidden
Earthshine reacted to benners for a topic
Methods I have tried\used in the past are: Disable mouse and keyboard using BlockInput Move the window off the desktop area so it can't be seen. Obviously there can be issues with unexpected prompts which you can't see, thus pausing the setup. Another is to repackage the installer, if it isn't a big one with tons of reg entries. Some are pretty simple I have tried to minimise installers or hide windows, but some have spawned another process during install that showed a window anyway.1 point -
Run setup.exe minimized or hidden
Earthshine reacted to jguinch for a topic
Unlikely given how fast it executes with the ControlClick calls I am using I'm not sure you can use ControlClick if the window is minimized or hidden, I think the window must me visible. One way is to use that kind of method : Run("setup.exe") Local $hSetupWindow = WinWait("title of the installation window") WinSetTrans($hSetupWindow, 1) ControlClick(....)1 point -
NEW VERSION: 17 Jun 2013 Ever wondered how to avoid input being so painful? You can type a lot of errors in a GUICtrlCreateInput, for example alphanumeric where you want only numbers and decimals, typing 10 characters where you only want 9, etc. Input masks can make your life easier and Validation can be as simple as this: GuiCtrlCreateLabel("Input Decimal(8,2)", 10, 110, 200, 15) $MyInput = GUICtrlCreateInput("",210,110,110,20) _Inputmask_add($MyInput, $iIM_INTEGER, 0, "", 8, 2) It requires only one additional line per input The UDFexample script demonstrates 13 dynamic input validations. A lot more validations can be made. Up to you to be inventive. _inputmask 1.0.0.5.zip Enhanced: Better input control - The previous versions worked well with blank fields but editing non-blank inputs was really a pain. Now the cursor remains where the edit is occurring. Once the max width is reached, no additional characters can be added. - Added beep on invalid entry. In fact I use soundplay instead of beep because beep gives a cracking sound result on my laptop. You can set beep off (put Global $bBeep = False anywhere in your script) If you prefer a true beep, you can beep it on in line 150. Minor issue: - decimal Numbers after the '.' scroll away when inserting until it bumps to the max allowed decimals. I didn't fix that yet, I don't know how to solve this ... Examples: Example 1 _inputmask - example.au3 (see zip file) Example 2: _Inputmask combining two WM_COMMAND handlers (see zip file) Thanks to Melba23 for his explanation how to combine GUIRegisterMsg WM_COMMAND handlers) If you create your own input mask that could be useful for the AutoIt community, please let me know, I will be glad to add it to the above example. GreenCan1 point
-
Calling 7z.dll
obiwanceleri reacted to Biatu for a topic
Yea, i know it's been a while but I finally took a moment to knock this one out for good... I rewrote the script into a single include that can extract files to disk in a folder of choice or into an array for diskless extraction. I also implemented trancexx's Subrogation so that this can be run from memory entirely. Examples provided as well, it's a bit too big for forums so, here is a MEGA link... https://mega.nz/#!MBQhDaQS!VzKgH9P6QhhAv2tQykIRWmUDyi0GVxZZA9pSIGu130c Edit: the only catch is that I cant get LZMA, Base64, and SHA1 to work on x64, however if you remove the MemDll and subrogation bits, it will function fine on x64.1 point -
I would do something like this (tailor as necessary) $idBtnSelect1 = GUICtrlCreateButton("...", $FS1X, $FS1Y, 20, 22) GUICtrlSetOnEvent(-1, "SelectButtonEvent") GUICtrlSetTip(-1, $Tip3, "FileSelect", 1) $idBtnSelect2 = GUICtrlCreateButton("...", $FS1X, $FS1Y + 30, 20, 22) GUICtrlSetOnEvent(-1, "SelectButtonEvent") GUICtrlSetTip(-1, $Tip3, "FileSelect", 1) $idBtnSelect3 = GUICtrlCreateButton("...", $FS1X, $FS1Y + 60, 20, 22) GUICtrlSetOnEvent(-1, "SelectButtonEvent") GUICtrlSetTip(-1, $Tip3, "FileSelect", 1) Func SelectButtonEvent() Switch @GUI_CtrlId Case $idBtnSelect1 SelectFile(1) Case $idBtnSelect2 SelectFile(2) Case $idBtnSelect3 SelectFile(3) EndSwitch EndFunc Func SelectFile($iKey) $FileDlgApp = FileOpenDialog('Select File', @DesktopDir, "All (*.*)") If Not @error Then IniWrite($Ini, "abc", "AppStr" & $iKey, $FileDlgApp) GUICtrlSetData($UserAppStr[$iKey], $FileDlgApp) EndIf EndFunc1 point
-
_NetStat_GetData
Earthshine reacted to spudw2k for a topic
Did a little code cleanup / restruct and added functionality to add process name--as determined by PID--to the array by default.1 point -
Run setup.exe minimized or hidden
Earthshine reacted to JLogan3o13 for a topic
@youtuber if you read the OP he states very clearly that it is resistant to silent installs with parameters...1 point -
If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.1 point
-
If you space key is pressed return 1 in _KeyProc instead _WinAPI_CallNextHookEx. that will block the space key. Saludos1 point
-
@jchd, that query is really insane, You are a crazy! ... (i'm joking btw ) Just a question please: what is the difficulty level of a sudoku determined from? i.e: in what differs the initial states of "Easy" or "Hard" or "Hardest" ? .... Thanks1 point
-
Something like this usually works for me: ControlListView($hWnd, "", "SysListView321", "Select", $k, $k) ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]") Really i think you should check the control id. Try this "SysListView321" What does it show as the ID with the info tool?1 point
-
_NetStat_GetData
Draygoes reacted to argumentum for a topic
..you reminded me of a silly story: http://sirkan.iit.bme.hu/~kapolnai/fun/bitchecker.html1 point -
Version 2.2
363 downloads
Program+Folder - This application allows you to create sudo persistent shortcuts on a removable device. If you create a regular shortcut on a removable device and its drive letter changes or you move it to another PC, the shortcut stops working. This little program helps solve that. Simply run the application from the root of your device and follow the tree to the application you want to make a shortcut to. Application must be an EXE. program+folder has to be in a parent folder to the application you are creating the shortcut for. See screenshots for example. Originally I had called this Folder+Program, but thought it better to put the program name first for better sorting. There are bound to be bugs and limitations so try it out and let me know how to improve it.1 point -
How this a3x works?
GoogleDude reacted to Melba23 for a topic
Auto That, Thank you for explaining - I understand now. But I am not at all surprised that .au3 files renamed to .a3x still run - the existence of the /AutoIt3ExecuteScript parameter and the fact that .a3x files can now be included in scripts suggests that the interpreter is quite capable of working out what has been passed to it. But it was a fun episode for a rainy evening. M231 point -
How this a3x works?
GoogleDude reacted to Melba23 for a topic
AutoThat, Re-read what I posted above. It is not a simple renaming of an .au3 file - it is compiling it to .a3x format rather than .exe. M231 point -
How this a3x works?
GoogleDude reacted to Melba23 for a topic
AutoThat, Welcome to the AutoIt forum. When AutoIt "compiles" a script to .exe format it converts the script into a tokenized form and then encrypts and compresses it using some proprietary algorithms. The result is an .a3x file which is placed into the interpreter resource table and the result is a "compiled" runnable executable. Compiling a script to .a3x format just misses out the final step. Thus any .a3x file can be run by any AutoIt interpreter and, since the last release, used as an #include file. No sorcery at all. Does that answer your question? M231 point