Jump to content

Arrrghmatey

Active Members
  • Posts

    49
  • Joined

  • Last visited

About Arrrghmatey

  • Birthday 01/01/1984

Profile Information

  • Location
    Washington State

Arrrghmatey's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. 1280 x 960. Which is correct for ONE monitor. But I have TWO. The primary monitor is the one that displays the program that is always on top. Since msgboxes always pop up on there, it gets hidden under the program. it has a timeout, so it is very important that the user see it, and they can't when they can't see it!
  2. Well, I just set the location to like (1800,500) and it works fine for now (I think). However, after some research it looks like you cannot move a msgbox... Very odd. Any suggestions on what to do, besides creating a new GUI window instead of the msgbox? if all else fails I'll just do that, although now I need to figure out how to do a time out.
  3. I am writing a program working with dual monitors. When I run the GUI, the main window is on the right side, exactly what I want. But when I create new GUI windows on the fly, they end up on the left side, and same with MsgBoxes. This is not good because the program on the left side is always on top.... I want to make sure that new MsgBoxes and windows always open up centered and on top of the parent gui. Is this possible? If so how do I do it? Sorry if this is a stupid question... My brain is broken right now
  4. I figured out a solution. I was using " where I should have been using '. in case anyone else wants it, here's my code: <script LANGUAGE="javascript" TYPE="text/javascript" > function PROCTest(imgPath) { var path = '\"C:\\Program Files\\example\\example.exe\" ' + '\"' + imgPath + '\"'; var myshell = new ActiveXObject( "WScript.shell" ); myshell.run( path, 1, true ); } </SCRIPT> <!-------------------------------------------------------------------> <a href="javascript:PROCTest('C:\\5H3QM0AC')">Launch the executable</a> Thanks!
  5. This is what I'm using right now: <script> function LaunchApp() { if (!document.all) { alert ("Available only with Internet Explorer."); return; } var ws = new ActiveXObject("WScript.Shell"); ws.Exec("C:\\Program Files\\ezdicom\\StandAlone\\ezDicom.exe"); } </script> <a href="javascript:LaunchApp()">Launch the executable</a> But it launches the program. I can't seem to figure out how to launch a FILE in the program... Ideally I won't have to install anything, as this will be ported around to other computers here.
  6. Hello, I have a program that reads information from a file, and dumps it into a HTML table, then opens the file in IE. I want to be able to have the name of the file a click-able link, where it opens that file in a specific program. Because this is not the default program to open this file type, I cannot figure out how to open it with the specific client side program. Is this possible at all? Thanks!
  7. Yep. PS. The easiest way to search the doc is use Google to search only the www.autoitscript.com domain and type in your keywords.
  8. Show me your .ini file. Also, why include <Rune Definitions.au3>?? what's in it?
  9. Ok, I wrote the entire program for you, but then you would never learn how to use autoit, so I don't know if I should give it to you. I can help you though. One suggestion, use OnEvent mode, it is so much easier. Then use this function or something similar. It's really close to what I wrote before, but it actually sets the labels that need to be created somewhere else in the program. Func getInfo() $Section = "0" $Runes = IniReadSectionNames ( $fileName ) $nameInput = GUICtrlRead($InputRuneWord);This is what the user typed For $i = 1 to $Runes[0];$Runes[0]is the size of the array ;the inputted text ("ven") and taking the the length of it (3) $length = StringLen($nameInput) ;Now we compare the first X (in this case 3) letters of each rune to the inputted text If $nameInput = StringLeft ( $Runes[$i], $length ) Then $Section = $Runes[$i] ExitLoop;optional, but just to save time. I THINK this is the proper use EndIf Next ;ok, now you know what section, so read the info. you can do this two ways but I'll ;do it the long way for you to understand ;take each section and display it. You need to have already created labels named $EquipLbl, $HPLbl, $MPLbl If $Section <> "0" Then GUICtrlSetData ( $EquipLbl, IniRead( $fileName, $Section, "Equip","0" ) ) GUICtrlSetData ( $HPLbl, IniRead( $fileName, $Section, "HP","0" ) ) GUICtrlSetData ( $MPLbl, IniRead( $fileName, $Section, "MP","0" ) ) Else GUICtrlSetData ( $EquipLbl, "N/A" ) GUICtrlSetData ( $HPLbl, "N/A" ) GUICtrlSetData ( $MPLbl, "N/A" ) EndIf EndFunc Read the manual to figure out OnEvent mode. Otherwise you could still use the other way, and still have this function run if the button is pressed. Hopefully you can figure it out. If not, I have a complete working program.
  10. So what happens if the user types in an abbreviation?
  11. Ok, it's really quite simple to use an .ini file. Here's an example file (I'm just making up crap): [Venom] Damage = 1-2 HP = +100 MP = +201 [Ice] Damage = 2-4 HP = +40 MP = +400 I don't have time to write out the script for you, but I'll give it to you step by step. 1. read the section names: $Runes = IniReadSectionNames ( "filename.ini" ) this return an array containing all the section names (the names in brackets) 2. Using a For loop, go through each section name, and see if any of the section names match the user input, in part or whole. That's what my code above did. 3. When you get to a match, user InireadSection() or Iniread() to grab all the keys, and display their info. $fileName = "file.ini" $Runes = IniReadSectionNames ( $fileName ) $nameInput = "Ven" ;This is what the user typed For $i = 1 to $Runes[0] ;$Runes[0]is the size of the array ;the inputted text ("ven") and taking the the length of it (3) $length = StringLen($nameInput) ;Now we compare the first X (in this case 3) letters of each rune to the inputted text If $nameInput = StringLeft ( $Runes[$i], $length ) Then $Section = $Runes[$i] ExitLoop ;optional, but just to save time. I THINK this is the proper use EndIf Next ;ok, now you know what section, so read the info. you can do this two ways but I'll ;do it the long way for you to understand ;take each section and display it $Damage = IniRead( $fileName, $Section, "Damage","0" ) $HP = IniRead( $fileName, $Section, "HP","0" ) $MP = IniRead( $fileName, $Section, "MP","0" ) ;Now just display this info accordingly, in labels, text boxes or what not. OK, so I basically wrote it for you... I hope this helps, and if not...
  12. Why are you making a .gif with just text information? If you are just displaying text, there is no need for an image; it just wastes time and space. I would suggest using a multi-dimensional array, where $info[1][0] is the name that you type in, $info[1][1] is one section of the info, and so on. Then you display each part in a separate text box. if you want it all cool and black, you can still do that with styles and extended styles. Also, this way abbreviations would work. Such as: ; warning, this might be super crappy because I'm running off 3 hours of sleep $nameInput = "Dev" For $i = 1 to $info[0][0] If $nameInput = StringLeft ( $info[$i][0], StringLen($nameInput) ) Then ;Display info in corresponding labels or text boxes EndIf Next This could also be done with a database, ini file (easiest IMO), or flat text file. All would work and be easier than an image for each item. For the ini file, each section name could be the name, and the keys could correspond with the different categories of info. Grab all the section names, find the best match, and display all the keys into labels or text boxes.
  13. Try this: DirMove("C:\New File", "C:\" & @MON & @MDAY & @YEAR) Think of @MON as a variable. When you place it IN the quotes, it is just regular text, so it prints "@MON" exactly. You need to concatenate it with the string, using the & symbol
  14. My mistake, however I still don't get the correct answer. It gives me 645. When I change it to $result2[1] through $result2[5] none of them are the correct answer... all of them give me the same answer I put in, or for the ptr, it gives me 94508 when I know it is .247.... EDIT: I changed 'int_ptr' to 'str' and it worked..... Thanks for the help, now I think I actually understand dllcall and how to use it.
  15. $result2 = DllCall($dll, "int", "GetElement", "int", 645, "int", 0, "int", 0, "int_ptr", "", "int", 64) Msgbox(0,"ok Y", $result[1]) gives me: Z:\dasa\AutoIt\test.au3 (23) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Msgbox(0,"ok Y", $result[1]) While when I did it this way: $struct=DllStructCreate("char[128]") DllStructSetData($struct,1,$in) $result2 = DllCall($dll, "int", "GetElement", "int", 644, "int", 0, "int", 0, "ptr", DllStructGetPtr($struct,1), "int", 64) $mmPerPx = DllStructGetData($struct,1) Msgbox(0,"ok Y", $mmPerPx) I got the correct answer. Did I do it wrong?
×
×
  • Create New...