Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/02/2018 in all areas

  1. Slightly adapted from a clever SQLite solution by Edzard Pasma and uses Peter Norvig's method. Requires a recent version of the SQLite3 DLL since it uses recursive CTEs (Common Table Expression). Norvig's algorithm goes like this: -- . from given Sudoku problem, generate an array with each cell of the sudoku being a string with all remaining possibilites -- . define as "neighbors" of a cell, all cells which must not have the same piece as this cells, (there are 20 neighbors to each cell) -- . then analyse the cell (the string) have the less remaining solutions, but more than 1, -- .. for a given sudoku position, "play" only on the first cell you found with the less possibilities, and try each of them, -- ... replace in this cell the string by the possible piece you want to try, -- ... remove the piece you played from the neighbors cells own possibilities (as it's no more a possibility for them) -- ... when removing a possibility to a neighbor, if it leave him only on possibility, "play" it immediately, -- ... if you remove all the solutions from a neighbor, than you're not on the sudoku solution path, stop this track. Run this from Scite in UTF-8 (Unicode characters inside) and use a fixed-pitch font for console display. I'm too lazy at time of posting to make a nice GUI for it (MsgBox uses a proportional font which renders the output unreadable). #include <SQLite.au3> ;~ #include <SQLite.dll.au3> ; download the most recent suitable DLL once and comment this out Local $hDB Local $aSudokus[6][2] = [ _ ["Easy", "53..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5....8..79"], _ ["Sqlite", "1....7.9..3..2...8..96..5....53..9...1..8...26....4...3......1..4......7..7...3.."], _ ["Hard", ".....6....59.....82....8....45........3........6..3.54...325..6.................."], _ ["Hola", "4.2....3.1..6.5.299.....1......42....8.9.1.5....85......3.....861.5.4..2.4....5.7"], _ ["Hardest", "8..........36......7..9.2...5...7.......457.....1...3...1....68..85...1..9....4.."], _ ["EasterMonster", "1.......2.9.4...5...6...7...5.9.3.......7.......85..4.7.....6...3...9.8...2.....1"] _ ] _SQLite_Startup() $hDB = _SQLite_Open() Local $sTempCreate = "" & _ "create temporary table i (" & _ "i integer primary key, " & _ "name char, " & _ "word0, " & _ "word1, " & _ "peers0, " & _ "peers1)" & _ ";" & _ "insert into i " & _ "select i, " & _ "char(65+y)||(x+1) as name, " & _ "case when iword=0 then 1<<ibit else 0 end AS word0, " & _ "case when iword=1 then 1<<ibit else 0 end AS word1, " & _ "CASE WHEN iword=0 THEN (512-1)<<(y*9) ELSE 0 END | " & _ "((1+512*(1+512*(1+512*(1+512*(1+512)))))<<x) | " & _ "CASE WHEN iword=0 THEN ((8-1)*(1+512*(1+512)))<<(y/3*3*9+x/3*3) ELSE 0 END AS peers0, " & _ "CASE WHEN iword=1 THEN (512-1)<<((y%6)*9) ELSE 0 END | " & _ "((1 + 512 * (1 + 512)) << x) | " & _ "CASE WHEN iword=1 THEN ((8-1)*(1+512*(1+512)))<<((y%6)/3*3*9+x/3*3) ELSE 0 END AS peers1 " & _ "from (" & _ "with xy AS (SELECT 0 AS xy UNION ALL SELECT xy+1 FROM xy WHERE xy < 80) " & _ "select xy+1 AS i, " & _ "xy%9 AS x, " & _ "xy/9 AS y, " & _ "xy/54 AS iword, " & _ "xy%54 AS ibit " & _ "from xy" & _ ")" & _ ";" _SQLite_Exec($hDB, $sTempCreate) Local $sInsaneSolver = "" & _ "with z AS (SELECT 1 AS z UNION ALL SELECT z+1 FROM z WHERE z < 9), " & _ "input as (" & _ "select input, " & _ "sud, " & _ "ifnull (sum (word0), 0) as w0, " & _ "ifnull (sum (word1), 0) as w1, " & _ "ifnull (sum (case when z=1 then word0 end), 0) as w10, " & _ "ifnull (sum (case when z=1 then word1 end), 0) as w11, " & _ "ifnull (sum (case when z=2 then word0 end), 0) as w20, " & _ "ifnull (sum (case when z=2 then word1 end), 0) as w21, " & _ "ifnull (sum (case when z=3 then word0 end), 0) as w30, " & _ "ifnull (sum (case when z=3 then word1 end), 0) as w31, " & _ "ifnull (sum (case when z=4 then word0 end), 0) as w40, " & _ "ifnull (sum (case when z=4 then word1 end), 0) as w41, " & _ "ifnull (sum (case when z=5 then word0 end), 0) as w50, " & _ "ifnull (sum (case when z=5 then word1 end), 0) as w51, " & _ "ifnull (sum (case when z=6 then word0 end), 0) as w60, " & _ "ifnull (sum (case when z=6 then word1 end), 0) as w61, " & _ "ifnull (sum (case when z=7 then word0 end), 0) as w70, " & _ "ifnull (sum (case when z=7 then word1 end), 0) as w71, " & _ "ifnull (sum (case when z=8 then word0 end), 0) as w80, " & _ "ifnull (sum (case when z=8 then word1 end), 0) as w81, " & _ "ifnull (sum (case when z=9 then word0 end), 0) as w90, " & _ "ifnull (sum (case when z=9 then word1 end), 0) as w91, " & _ "count (*) as fixed, " & _ "ifnull (sum (z=1), 0) as f1, " & _ "ifnull (sum (z=2), 0) as f2, " & _ "ifnull (sum (z=3), 0) as f3, " & _ "ifnull (sum (z=4), 0) as f4, " & _ "ifnull (sum (z=5), 0) as f5, " & _ "ifnull (sum (z=6), 0) as f6, " & _ "ifnull (sum (z=7), 0) as f7, " & _ "ifnull (sum (z=8), 0) as f8, " & _ "ifnull (sum (z=9), 0) as f9 " & _ "from ( " & _ "select '" & $aSudokus[0][0] & "' as input, " & _ "'" & $aSudokus[0][1] & "' as sud " & _ "union all " & _ "select '" & $aSudokus[1][0] & "', " & _ "'" & $aSudokus[1][1] & "' " & _ "union all " & _ "select '" & $aSudokus[2][0] & "', " & _ "'" & $aSudokus[2][1] & "' " & _ "union all " & _ "select '" & $aSudokus[3][0] & "', " & _ "'" & $aSudokus[3][1] & "' " & _ "union all " & _ "select '" & $aSudokus[4][0] & "', " & _ "'" & $aSudokus[4][1] & "' " & _ "union all " & _ "select '" & $aSudokus[5][0] & "', " & _ "'" & $aSudokus[5][1] & "' " & _ ") " & _ "join i " & _ "join z on z = cast (substr (sud, i.i, 1) as int) " & _ "where input='#####' " & _ ") " & _ ", " & _ "sudoku as (" & _ "select " & _ "'' as text, " & _ "fixed, " & _ "f1,f2,f3,f4,f5,f6,f7,f8,f9, " & _ "0 as zfixed, " & _ "0 as i0, " & _ "w0, w1, " & _ "w10, w11, " & _ "w20, w21, " & _ "w30, w31, " & _ "w40, w41, " & _ "w50, w51, " & _ "w60, w61, " & _ "w70, w71, " & _ "w80, w81, " & _ "w90, w91 " & _ "from input " & _ "union all " & _ "select " & _ "(fixed+1)||','|| " & _ "name||','|| " & _ "( " & _ "(w10&peers0 or w11&peers1) + " & _ "(w20&peers0 or w21&peers1) + " & _ "(w30&peers0 or w31&peers1) + " & _ "(w40&peers0 or w41&peers1) + " & _ "(w50&peers0 or w51&peers1) + " & _ "(w60&peers0 or w61&peers1) + " & _ "(w70&peers0 or w71&peers1) + " & _ "(w80&peers0 or w81&peers1) + " & _ "(w90&peers0 or w91&peers1) " & _ ") ||','|| " & _ "z||','|| " & _ "'', " & _ "fixed+1, " & _ "f1+(z=1), " & _ "f2+(z=2), " & _ "f3+(z=3), " & _ "f4+(z=4), " & _ "f5+(z=5), " & _ "f6+(z=6), " & _ "f7+(z=7), " & _ "f8+(z=8), " & _ "f9+(z=9), " & _ "case z " & _ "when 1 then f1 " & _ "when 2 then f2 " & _ "when 3 then f3 " & _ "when 4 then f4 " & _ "when 5 then f5 " & _ "when 6 then f6 " & _ "when 7 then f7 " & _ "when 8 then f8 " & _ "when 9 then f9 " & _ "end, " & _ "i.i, " & _ "w0+word0, " & _ "w1+word1, " & _ "case when z=1 then w10+word0 else w10 end, " & _ "case when z=1 then w11+word1 else w11 end, " & _ "case when z=2 then w20+word0 else w20 end, " & _ "case when z=2 then w21+word1 else w21 end, " & _ "case when z=3 then w30+word0 else w30 end, " & _ "case when z=3 then w31+word1 else w31 end, " & _ "case when z=4 then w40+word0 else w40 end, " & _ "case when z=4 then w41+word1 else w41 end, " & _ "case when z=5 then w50+word0 else w50 end, " & _ "case when z=5 then w51+word1 else w51 end, " & _ "case when z=6 then w60+word0 else w60 end, " & _ "case when z=6 then w61+word1 else w61 end, " & _ "case when z=7 then w70+word0 else w70 end, " & _ "case when z=7 then w71+word1 else w71 end, " & _ "case when z=8 then w80+word0 else w80 end, " & _ "case when z=8 then w81+word1 else w81 end, " & _ "case when z=9 then w90+word0 else w90 end, " & _ "case when z=9 then w91+word1 else w91 end " & _ "from sudoku " & _ "join i " & _ "on i = ifnull ( " & _ "( " & _ "select i " & _ "from i " & _ "where i > i0 " & _ "and not (word0&w0 or word1&w1) " & _ "and ( " & _ "(w10&peers0 or w11&peers1) + " & _ "(w20&peers0 or w21&peers1) + " & _ "(w30&peers0 or w31&peers1) + " & _ "(w40&peers0 or w41&peers1) + " & _ "(w50&peers0 or w51&peers1) + " & _ "(w60&peers0 or w61&peers1) + " & _ "(w70&peers0 or w71&peers1) + " & _ "(w80&peers0 or w81&peers1) + " & _ "(w90&peers0 or w91&peers1) " & _ ") = 8 " & _ "limit 1 " & _ ") " & _ ", " & _ "( " & _ "select i " & _ "from ( " & _ "select i, " & _ "max ( " & _ "(w10&peers0 or w11&peers1) + " & _ "(w20&peers0 or w21&peers1) + " & _ "(w30&peers0 or w31&peers1) + " & _ "(w40&peers0 or w41&peers1) + " & _ "(w50&peers0 or w51&peers1) + " & _ "(w60&peers0 or w61&peers1) + " & _ "(w70&peers0 or w71&peers1) + " & _ "(w80&peers0 or w81&peers1) + " & _ "(w90&peers0 or w91&peers1) " & _ ") as maxfixed " & _ "from i " & _ "where not (word0&w0 or word1&w1) " & _ ") " & _ "where maxfixed is not null " & _ ")) " & _ "join z " & _ "on " & _ "case z " & _ "when 1 then not (w10&peers0 or w11&peers1) " & _ "when 2 then not (w20&peers0 or w21&peers1) " & _ "when 3 then not (w30&peers0 or w31&peers1) " & _ "when 4 then not (w40&peers0 or w41&peers1) " & _ "when 5 then not (w50&peers0 or w51&peers1) " & _ "when 6 then not (w60&peers0 or w61&peers1) " & _ "when 7 then not (w70&peers0 or w71&peers1) " & _ "when 8 then not (w80&peers0 or w81&peers1) " & _ "when 9 then not (w90&peers0 or w91&peers1) " & _ "end " & _ "order by fixed desc, " & _ "zfixed desc " & _ ") " & _ ", " & _ "output as ( " & _ "select * " & _ "from ( " & _ "select 1 as i, " & _ "w10, w11, " & _ "w20, w21, " & _ "w30, w31, " & _ "w40, w41, " & _ "w50, w51, " & _ "w60, w61, " & _ "w70, w71, " & _ "w80, w81, " & _ "w90, w91, " & _ "'' as sud " & _ "from sudoku " & _ "where fixed = 81 limit 1 " & _ ") " & _ "union all " & _ "select nullif (output.i + 1, 82), " & _ "w10, w11, " & _ "w20, w21, " & _ "w30, w31, " & _ "w40, w41, " & _ "w50, w51, " & _ "w60, w61, " & _ "w70, w71, " & _ "w80, w81, " & _ "w90, w91, " & _ "sud || replace (cast ( " & _ "case 1 " & _ "when w10&word0 OR w11&word1 then 1 " & _ "when w20&word0 OR w21&word1 then 2 " & _ "when w30&word0 OR w31&word1 then 3 " & _ "when w40&word0 OR w41&word1 then 4 " & _ "when w50&word0 OR w51&word1 then 5 " & _ "when w60&word0 OR w61&word1 then 6 " & _ "when w70&word0 OR w71&word1 then 7 " & _ "when w80&word0 OR w81&word1 then 8 " & _ "when w90&word0 OR w91&word1 then 9 " & _ "else 0 " & _ "end " & _ "as char), '0', '.') " & _ "from output " & _ "join i on i.i = output.i " & _ ") " & _ ", " & _ "result as (select sud s from input union all select sud from output WHERE i is null) " & _ "SELECT " & _ "'┏━┯━┯━┳━┯━┯━┳━┯━┯━┓' || x'0d0a' || " & _ "'┃' || substr(s, 1,1) || '│' || substr(s, 2,1) || '│' || substr(s, 3,1) || '┃' || " & _ "substr(s, 4,1) || '│' || substr(s, 5,1) || '│' || substr(s, 6,1) || '┃' || " & _ "substr(s, 7,1) || '│' || substr(s, 8,1) || '│' || substr(s, 9,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,10,1) || '│' || substr(s,11,1) || '│' || substr(s,12,1) || '┃' || " & _ "substr(s,13,1) || '│' || substr(s,14,1) || '│' || substr(s,15,1) || '┃' || " & _ "substr(s,16,1) || '│' || substr(s,17,1) || '│' || substr(s,18,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,19,1) || '│' || substr(s,20,1) || '│' || substr(s,21,1) || '┃' || " & _ "substr(s,22,1) || '│' || substr(s,23,1) || '│' || substr(s,24,1) || '┃' || " & _ "substr(s,25,1) || '│' || substr(s,26,1) || '│' || substr(s,27,1) || '┃' || x'0d0a' || " & _ "'┣━┿━┿━╋━┿━┿━╋━┿━┿━┫' || x'0d0a' || " & _ "'┃' || substr(s,28,1) || '│' || substr(s,29,1) || '│' || substr(s,30,1) || '┃' || " & _ "substr(s,31,1) || '│' || substr(s,32,1) || '│' || substr(s,33,1) || '┃' || " & _ "substr(s,34,1) || '│' || substr(s,35,1) || '│' || substr(s,36,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,37,1) || '│' || substr(s,38,1) || '│' || substr(s,39,1) || '┃' || " & _ "substr(s,40,1) || '│' || substr(s,41,1) || '│' || substr(s,42,1) || '┃' || " & _ "substr(s,43,1) || '│' || substr(s,44,1) || '│' || substr(s,45,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,46,1) || '│' || substr(s,47,1) || '│' || substr(s,48,1) || '┃' || " & _ "substr(s,49,1) || '│' || substr(s,50,1) || '│' || substr(s,51,1) || '┃' || " & _ "substr(s,52,1) || '│' || substr(s,53,1) || '│' || substr(s,54,1) || '┃' || x'0d0a' || " & _ "'┣━┿━┿━╋━┿━┿━╋━┿━┿━┫' || x'0d0a' || " & _ "'┃' || substr(s,55,1) || '│' || substr(s,56,1) || '│' || substr(s,57,1) || '┃' || " & _ "substr(s,58,1) || '│' || substr(s,59,1) || '│' || substr(s,60,1) || '┃' || " & _ "substr(s,61,1) || '│' || substr(s,62,1) || '│' || substr(s,63,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,64,1) || '│' || substr(s,65,1) || '│' || substr(s,66,1) || '┃' || " & _ "substr(s,67,1) || '│' || substr(s,68,1) || '│' || substr(s,69,1) || '┃' || " & _ "substr(s,70,1) || '│' || substr(s,71,1) || '│' || substr(s,72,1) || '┃' || x'0d0a' || " & _ "'┠┄┼┄┼┄╂┄┼┄┼┄╂┄┼┄┼┄┨' || x'0d0a' || " & _ "'┃' || substr(s,73,1) || '│' || substr(s,74,1) || '│' || substr(s,75,1) || '┃' || " & _ "substr(s,76,1) || '│' || substr(s,77,1) || '│' || substr(s,78,1) || '┃' || " & _ "substr(s,79,1) || '│' || substr(s,80,1) || '│' || substr(s,81,1) || '┃' || x'0d0a' || " & _ "'┗━┷━┷━┻━┷━┷━┻━┷━┷━┛'" & _ "FROM result;" Local $aRows, $iRows, $iCols Local $sProblem For $n = 0 To UBound($aSudokus) - 1 $sProblem = StringReplace($sInsaneSolver, "#####", $aSudokus[$n][0]) _SQLite_GetTable($hDB, $sProblem, $aRows,$iRows, $iCols) _ConsoleWrite($aSudokus[$n][0] & " problem" & @LF & $aRows[2] & @LF & @LF) _ConsoleWrite($aSudokus[$n][0] & " solution" & @LF & $aRows[3] & @LF & @LF) Next Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s, 4), 1)) EndFunc Serious warning: the SQL involved is NOT for heartfainted people. You've been warned!
    3 points
  2. Xandy

    DragonWarrior3_Remake

    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.
    2 points
  3. 2 points
  4. You are posting in the "AutoIt General Help and Support" forum, but I still do not see a question
    1 point
  5. ohh OK then .. as i said couldn't test this out formyself and thanks again
    1 point
  6. YES. Admin or not, it worked fine. I can call any app on that directory.
    1 point
  7. well, it just uses a test app that searches for stuff. no major changes. working folder, drive that is mapped, etc. not like you could reproduce it. mine works properly with admin rights granted or not, but, I have UAC turned all the way down I believe, checked, no I don't. I don't know what kind of issue he is having. it works either way, same for me. His code with my drive and folder info. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <File.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> Local $sDrive = "S:" Local $sAppPath = DriveMapGet($sDrive)& "\public\company\listfiles.exe" Local $sWorkingFolder = DriveMapGet($sDrive)& "\public\company" Local $sCmdLine = "d: *.pdf" if ("" = DriveMapGet($sDrive)) Then MsgBox( $MB_OK, "Error - No Drive mapping", "The " &$sDrive & " is not mapped.") Else ;Check to see if we can find the exe file. if FileExists( $sAppPath ) Then ;~ if FileExists( $sWorkingFolder & "\Rfile.pot" ) Then Local $iPID = ShellExecute ( $sAppPath , $sCmdLine, $sWorkingFolder ) ;~ Else ;~ MsgBox( $MB_OK, "ERROR - File not found!", "Can not locate file: " & $sWorkingFolder & "\Rfile.pot" ) ;~ EndIf Else MsgBox( $MB_OK, "ERROR - File not found!", "Can not locate file: " & $sAppPath ) EndIf EndIf
    1 point
  8. I managed to solve the accelerator/tabstop issue for the moment, but now I've found an outright bug - When enabling or disabling a button, the hovers become unresponsive - if you click on the GUI however they work again. Re-activating the GUI does not solve it. I traced this cause to the GUICtrlSendMsg function. It's sending a message of code 0x172. I see that you're using raw numbers instead of constants all over the place. Wtf? How is anybody supposed to figure this out? This is not the first bug I've encountered, either, but the code in this UDF is too difficult to read. I think I'll just go and make my own implementation from scratch.
    1 point
  9. Well, what did the number do?
    1 point
  10. TheSaint

    DragonWarrior3_Remake

    As always Xandy, you continue to impress. Great work!
    1 point
  11. Example: $iCount = 1 ConsoleWrite(StringFormat('%06s', $iCount) & @CRLF) $iCount = 999 ConsoleWrite(StringFormat('%06s', $iCount) & @CRLF)
    1 point
  12. Set a flag within the function when it starts and reset it when the function ends. Check the flag inside your while loop and do a short sleep when the flag is set, else do whatever you want to do in the loop.
    1 point
  13. 1. No 2. Yes, once you learn the language. 3. Subjective question. Google and try them out until you find one that you're comfortable with.
    1 point
  14. Glutch (and UEZ), No need to be quite so complicated - use a cuebanner: #include <GUIConstantsEX.au3> #include <EditConstants.au3> $hGui = GUICreate("", 500, 500) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20) GUICtrlSendMsg($cInput, $EM_SETCUEBANNER, False, "Keys to press (optional)") $cButton = GUICtrlCreateButton("Test", 10, 100, 80, 30) GUICtrlSetState($cButton, $GUI_FOCUS) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I hope that helps. M23
    1 point
×
×
  • Create New...