adz89
Active Members-
Posts
44 -
Joined
-
Last visited
About adz89
- Birthday 08/31/1989
Profile Information
-
Location
Wales UK
adz89's Achievements
Seeker (1/7)
0
Reputation
-
It was the help that was ineffective, it was my programming skills!
-
Ok, I got it working, not sure what the problem was though. I renamed the non-working pic from screen to disp_ex and left it as a jpg, and resaved the jpg file to be a bmp... All working now though! Thanks for the help guys, if anyone's interested I'll post the working, final script later!
-
Well I'm out at the moment, but I'll try other images later, but the images can be open in picture viewer, and are both .jpg's... I'll let you know how it goes with other images.
-
Ok, well still nothing happening... Here is the code I used; #include <GUIConstantsEx.au3> buildGUI() while 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd func buildGUI() $m=700 $n=600 GUICreate("Display Control",$m,$n) GUISetState(@SW_SHOW) GUICtrlCreatePic(@ScriptDir & "GUIScreen.jpg",10,270,100,100) GUICtrlCreatePic(@ScriptDir & "GUIInfo.jpg",$m-110,$n-113,100,100) EndFunc
-
Ok will do, I'll let you know in due course
-
Well I added this; $check = FileExists(@ScriptDir & "GUIScreen.jpg") If $check = 1 Then MsgBox(0,"Success","File Exists") ElseIf $check = 0 Then MsgBox(0,"Fail","File not found") EndIf and it said that the file exists.
-
adz89 reacted to a post in a topic:
GUICtrlCreatePic Issues
-
Well I've created the GUI folder within the folder that the script is, and of course the correct file name/extension
-
Well I thought that would have been the way to go about it, I've come from a MATLAB programming background, so I'm having a bit of difficulty trying to get the syntax right. I've adjusted the script to now read GUICtrlCreatePic(@ScriptDir & "GUIScreen.jpg",10,270,100,100) GUICtrlCreatePic(@ScriptDir & "GUIInfo.jpg",$m-110,$n-113,100,100) but it still doesn't work...
-
Right, I've been racking my brain for a little while about this now, I've created a GUI sample for a design project in uni, however I can't get the pic function to work. We are designing a screen that will show time, date and some events etc. The code is below, and its the two GUICtrlCreatePic function calls that are the issue. They don't do anything, at all! #cs This is a script to run and display a GUI for EG-M62 group project It will call a window that will show the funtionality desired for the PC interaction of our product #ce #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $today= @YEAR & "/" & @MON & "/" & @MDAY buildGUI() while 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $close $close_response = MsgBox(1,"Warning","Close without saving?") Select Case $close_response = 1 ExitLoop EndSelect Case $msg = $button progress("Saving") $ok_response = MsgBox(64,"Complete", "Please reinsert USB into the base of the light") Select Case $ok_response = 1 ExitLoop EndSelect Case $msg = $fact_reset MsgBox(48,"Warning","Pressing ok will reset all values to default, and erase any stored events") progress("Resetting all data") MsgBox(64,"Completed","Reset completed") Case $msg = $update MsgBox(64,"Update","About to update the calendar files") progress("Updating; please wait") Case $msg = $exitfilemenu $close_response = MsgBox(1,"Warning","Close without saving?") Select Case $close_response = 1 ExitLoop EndSelect Case $msg = $manualedit Run("notepad.exe") Case $msg = $softupdate progress("Updating Software") Case $msg = $aboutdisp MsgBox(64,"About","LiteTawe Configuration Software; Version 0.1 BETA") Case $msg = $saveevent MsgBox(64,"Success","Event Saved") EndSelect WEnd func buildGUI() Global $button, $close, $fact_reset, $update, $exitfilemenu, $manualedit, $softupdate, $aboutdisp, $selecteddate, $eventname, $iconselect, $saveevent $m=700 $n=600 GUICreate("Display Control",$m,$n) GUISetState(@SW_SHOW) $filemenu = GUICtrlCreateMenu("&File") $advancedmenu = GUICtrlCreateMenu("&Advanced") $aboutmenu = GUICtrlCreateMenu("&About") $exitfilemenu = GUICtrlCreateMenuItem("Exit", $filemenu) $manualedit = GUICtrlCreateMenuItem("Manual Edit",$advancedmenu) $softupdate = GUICtrlCreateMenuItem("Update Software",$aboutmenu) $aboutdisp = GUICtrlCreateMenuItem("About",$aboutmenu) $button = GUICtrlCreateButton("Ok", $m-166, $n-80, 75, 23) $close = GUICtrlCreateButton("Close", $m-85, $n-80, 75, 23) $fact_reset = GUICtrlCreateButton("Factory Reset", $m-85,$n-50,75,23) $update = GUICtrlCreateButton("Update", $m-166,$n-50,75,23) GUICtrlCreateLabel("Clock format set-up", $m-136,10) $12hour = GUICtrlCreateRadio("12 Hour",$m-126,30) $24hour = GUICtrlCreateRadio("24 Hour",$m-126,50) $digital = GUICtrlCreateCheckbox("Digital",$m-126,70) $analogue = GUICtrlCreateCheckbox("Analogue",$m-126,90) GUICtrlCreateLabel("Add events to calendar",10,10) $selecteddate = GUICtrlCreateMonthCal($today,10,30,230,165) $eventname = GUICtrlCreateInput("",250,40,250,20) GUICtrlCreateLabel("Event Name",260,20,100,20) GUICtrlCreateLabel("Choose Icon",260,70,100,20) $iconselect = GUICtrlCreateButton("...",270,90,35,23) $annual = GUICtrlCreateCheckbox("Annual Event",315,90) $saveevent = GUICtrlCreateButton("Save Event",315,120,75,23) GUICtrlSetState($digital,$GUI_CHECKED) GUICtrlSetState($annual,$GUI_CHECKED) GUICtrlSetState($12hour,$GUI_CHECKED) GUICtrlCreatePic(@WorkingDir & "...\GUI\Screen.jpg",10,270,100,100) GUICtrlCreatePic(@WorkingDir & "...\GUI\Info.jpg",$m-110,$n-113,100,100) EndFunc func progress($textstring) ProgressOn("Progress", $textstring, "Working...") For $i = 0 To 100 ProgressSet($i) Sleep(5) Next ProgressSet(100, "Done!") Sleep(500) ProgressOff() EndFunc
-
I tried that but I'm not sure what number it's taken and put in the array, I need to columns one with a x value and one with a y value, Its an awkward one this, thanks for your help so far, its given me a base to start experimenting
-
Hey guys, I've got a table here: http://www.twstats.com/en25/index.php?page...ilter=abandoned Now my script is way to big to post here, however I get to this page, no problems, but now I want the script to look at the page, then write all the values from the table somewhere, i.e. an ini file or excel spreadsheet After I get the data I want script to find the ten highest points (Far right column), and the coordinates of the village (Its Barbarian Village (x|y)) Now I'm really struggling with the first part, and the second I have no idea what to do!! At the moment I've got this, (for reading the table): $oIE2 = _IECreate($targetingaddress,0,1) $otargetstable=_IETableGetCollection($oIE2) $atargetsdata=_IETableWriteToArray($otargetstable) IniWriteSection(@ProgramFilesDir & "\ARSoft\TribalwarsAI\targeting.ini","Target Array",$atargetsdata)With the $targetaddress being the link I posted at the top of this question! Please help someone? Adam EDIT: Typo EDIT2: Another Typo :S
-
Hey guys, Im in a bit of a predicament, I'm writing a script which kind of acts as a GUI for a internet based game, so the user doesn't need to access the website all the time, the program does it for them, but it requires a password and username. I found that the best route to take is to ask the user for the username and password, then save them in an .ini file. The only problem I've come across so far is the delete settings function I've found, (sometimes people start again with a new username and password), I want the script to delete the .ini file and run the set-up loop again, I don't want to go down the road of putting the setup loop in a function and calling that as this wouldn't completely solve the problem, I'd rather the script revert back to a line in the script, Is that possible? Adam
-
How do you mean? Would I take it out of my while loop altogether?
-
Right then this is part of my Tribal Wars bot, but its to do with the menu, I've got this code: While 1=1 $msg = TrayGetMsg() If $msg = $defensiveitem Then IniWrite(@ProgramFilesDir & "\ARSoft\TribalwarsAI\setup.ini", "AI Settings", "stance", "Defensive") $stance = "Defensive" MsgBox(0, "Success", "Stance changed to "& $stance) ElseIf $msg = $balanceditem Then IniWrite(@ProgramFilesDir & "\ARSoft\TribalwarsAI\setup.ini", "AI Settings", "stance", "All Rounder") $stance = "All Rounder" MsgBox(0, "Success", "Stance changed to "& $stance) ElseIf $msg = $resourceitem Then IniWrite(@ProgramFilesDir & "\ARSoft\TribalwarsAI\setup.ini", "AI Settings", "stance", "Resources") $stance = "Resources" MsgBox(0, "Success", "Stance changed to "& $stance) ElseIf $msg = $showstanceitem Then ToolTip("Current Stance is "& $stance) ElseIf $msg = $runsetupitem Then $msg2 = MsgBox(4, "WARNING", "This will delete the set-up file on your computer, this will allow you to completely re-write all the settings, do you want to continue?") If $msg2 = 6 Then FileDelete(@ProgramFilesDir & "\ARSoft\TribalwarsAI\setup.ini") EndIf Else runbuildings() rununits() EndIf WEnd Which basically keeps my script running, and I thought I'd would stop when I click the icon, and then carry on... But it doesn't always respond to my menu clicks on the icon, and when I manage to get it to respond the program terminates, not what I wanted at all! Can anyone help me?
-
Well I know what I'm going to do with the data I get, but I don't actually know how to get the countdown from the webpage... The script has to wait until the end of the countdown anyway, as the website won't take any input while the countdown is running!