@idle, juergenkulow and Axolotl
Hi again,
Thank you all for your examples, they all work and are great.
juergenkulow's example was the closest to what I was looking for and I may use it. But at some point I do want to combine both InputRequesters into one input and I may combine juergenkulow's into one.
idle's and Axolotl's if I remember right already do that and I may choose to use one of theirs, but for now I spent some time after I got home from work to see if I could figure out myself how to use my original idea with 2 InputRequesters and I was able to get some simple code to work for now which I have posted below. While I was at work I researched about converting a numerical string into an integer and came across the Val() command. So I worked at it hard and came up with as I said already the code below for now until I want to combine things into one. I will edit the below code to do even more of what I want eventually.
Thank you all for your help
Code: Select all
Global W.i, H.i
If OpenWindow(0, 0, 0, 1024, 768, "M.i.ED", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Width$ = InputRequester("M.i.ED", "Enter New Image Width", "")
Height$ = InputRequester("M.i.ED", "Enter New Image Height$", "")
W = Val(Width$)
H = Val(Height$)
Debug W
Debug H
CreateImage(1, W, H, 32)
StartDrawing(ImageOutput(1))
DrawImage(ImageID(1), 0, 0, W, H)
Box(0, 0, W, H)
FillArea(0, 0, -1, #White)
StopDrawing()
ImageGadget(1, 0, 0, W, H, ImageID(1), #PB_Image_Border)
Repeat
event = WaitWindowEvent()
Until #PB_Event_CloseWindow=event
EndIf